Skip to content

Commit

Permalink
fix: Build image (#366)
Browse files Browse the repository at this point in the history
* fix: Build image

* fix: Use alpine

* fix: Use node 20

* fix: Use 18

* fix: Use ci

* fix: Remove max sockets

* fix: Remove build image step
  • Loading branch information
fzavalia authored Feb 14, 2024
1 parent d1bfced commit c9adb59
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ jobs:
run: npm run build
- name: test
run: npm run test

8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG RUN

FROM node:18 as builderenv
FROM node:18-alpine as builderenv

WORKDIR /app

Expand All @@ -11,17 +11,17 @@ RUN apk add --no-cache py3-setuptools python3-dev build-base
# install dependencies
COPY package.json /app/package.json
COPY package-lock.json /app/package-lock.json
RUN npm install --maxsockets=5
RUN npm ci

# build the app
COPY . /app
RUN npm run build
RUN npm run test

# remove devDependencies, keep only used dependencies
RUN npm install --only=production --maxsockets=5
RUN npm ci --only=production

FROM node:18
FROM node:18-alpine

RUN apk update
RUN apk add --no-cache tini
Expand Down

0 comments on commit c9adb59

Please sign in to comment.