Compare commits

...

2 Commits

Author SHA1 Message Date
Brain 7feee07d35 Merge pull request '♻️ Optimize Dockerfile' (!85) from optimize-dockerfile into main
continuous-integration/drone/push Build is failing Details
Reviewed-on: #85
Reviewed-by: srsh <srsh@noreply.git.wtf-eg.de>
2024-04-23 22:26:14 +02:00
nomaster f8e78d1cc8 ♻️ Optimize Dockerfile
continuous-integration/drone/pr Build is passing Details
- add all non-essential files to .dockerignore
- improve cachability by layers
- re-order lines to reduce layer generation
2024-01-12 18:42:27 +01:00
2 changed files with 21 additions and 4 deletions

View File

@ -1,2 +1,11 @@
.browserslistrc
.dockerignore
.drone.yml
.editorconfig
.git
.gitignore
.reuse
Dockerfile
LICENSES
README.md
node_modules

View File

@ -4,17 +4,25 @@
FROM node:14-alpine as builder
COPY . ./
COPY package.json package-lock.json .
RUN npm install
COPY .eslintrc.js .
COPY babel.config.js .
COPY public public
COPY src src
RUN npm ci && npm run build
FROM nginx as ki-frontend
COPY --from=builder /dist/ /usr/share/nginx/html/
COPY etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
LABEL org.opencontainers.image.source=https://git.wtf-eg.de/kompetenzinventar/ki-frontend.git
LABEL org.opencontainers.image.url=https://git.wtf-eg.de/kompetenzinventar/ki-frontend
LABEL org.opencontainers.image.documentation=https://git.wtf-eg.de/kompetenzinventar/ki-frontend#docker
LABEL org.opencontainers.image.vendor="WTF Kooperative eG"
WORKDIR /usr/share/nginx/html
COPY etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /dist .