Commit 1d7f0337 authored by nanahira's avatar nanahira

ci

parent 9109bce0
Pipeline #10229 passed with stages
in 1 minute and 39 seconds
...@@ -15,30 +15,9 @@ build-x86: ...@@ -15,30 +15,9 @@ build-x86:
tags: tags:
- docker - docker
script: script:
- TARGET_IMAGE=$CONTAINER_TEST_X86_IMAGE - TARGET_IMAGE=$CONTAINER_TEST_IMAGE
- docker build --pull -t $TARGET_IMAGE .
- docker push $TARGET_IMAGE
build-arm:
stage: build
tags:
- docker-arm
script:
- TARGET_IMAGE=$CONTAINER_TEST_ARM_IMAGE
- docker build --pull -t $TARGET_IMAGE . - docker build --pull -t $TARGET_IMAGE .
- docker push $TARGET_IMAGE - docker push $TARGET_IMAGE
combine:
stage: combine
tags:
- docker
script:
- TARGET_IMAGE=$CONTAINER_TEST_IMAGE
- SOURCE_IMAGE_2=$CONTAINER_TEST_ARM_IMAGE
- SOURCE_IMAGE_1=$CONTAINER_TEST_X86_IMAGE
- docker pull $SOURCE_IMAGE_1
- docker pull $SOURCE_IMAGE_2
- docker manifest create $TARGET_IMAGE --amend $SOURCE_IMAGE_1 --amend
$SOURCE_IMAGE_2
- docker manifest push $TARGET_IMAGE
deploy_latest: deploy_latest:
stage: deploy stage: deploy
tags: tags:
......
FROM node:bullseye-slim FROM node:bullseye-slim as base
LABEL Author="Nanahira <nanahira@momobako.com>" LABEL Author="Nanahira <nanahira@momobako.com>"
RUN apt update && apt -y install python3 build-essential && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* RUN apt update && apt -y install python3 build-essential && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/log/*
WORKDIR /usr/src/app WORKDIR /usr/src/app
COPY ./package*.json ./ COPY ./package*.json ./
RUN npm ci
FROM base as builder
RUN npm ci && npm cache clean --force
COPY . ./ COPY . ./
RUN npm run build RUN npm run build
CMD ["npm", "run", "start"] FROM base
ENV NODE_ENV production
RUN npm ci && npm cache clean --force
COPY --from=builder /usr/src/app/dist ./dist
CMD [ "npm", "start" ]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment