Skip to content

Commit

Permalink
Set up Dockerbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
alagishev committed Jan 19, 2025
1 parent f5a8289 commit c211463
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 22 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/docker-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Docker CI Workflow
on:
release:
types: [created]
push:
branches:
- '**'

jobs:
call-docker-ci-workflow:
uses: netcracker/qubership-apihub-ci/.github/workflows/docker-ci.yml@v3
with:
name: qubership-apihub-build-task-consumer
file: Dockerfile
context: ""
platforms: linux/amd64,linux/arm64
secrets:
NPMRC: ${{ secrets.NPMRC }}
17 changes: 0 additions & 17 deletions .github/workflows/frontend-ci.yaml

This file was deleted.

21 changes: 16 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
FROM node:20
FROM docker.io/node:20 as builder

WORKDIR /usr/src/app
WORKDIR /workspace

ADD .npmrc .npmrc
COPY src src
COPY package*.json ./
RUN npm ci
COPY tsconfig*.json ./

# for local machine build
#COPY .npmrc .npmrc
#RUN npm ci && npm run build --if-present

# for build via GitHub actions
RUN --mount=type=secret,id=npmrc,target=.npmrc npm ci && npm run build --if-present

FROM docker.io/node:20

WORKDIR /usr/src/app

ADD dist dist
COPY --from=builder /workspace/dist dist

USER 10001

Expand Down

0 comments on commit c211463

Please sign in to comment.