Basic Docker image for client app

This commit is contained in:
Björn Dahlgren
2023-12-17 17:37:39 +01:00
parent f36a29570b
commit 9d46a1c73f
4 changed files with 32 additions and 0 deletions

18
client/Dockerfile Normal file
View File

@@ -0,0 +1,18 @@
FROM node:20-alpine AS appbuild
WORKDIR /usr/src/app
COPY package.json ./
COPY package-lock.json ./
RUN npm install
COPY . .
RUN npm run build-release-linux
FROM node:20-alpine
WORKDIR /usr/src/app
COPY package.json ./
COPY package-lock.json ./
RUN npm install --omit=dev
COPY . .
COPY --from=appbuild /usr/src/app/public ./public
EXPOSE 3000
CMD npm start