Closed AdrianDsg closed 1 month ago
As the current Dockerfile
contains several vulnerabilities caused e.g. by using outdated images it might also be good adapting the file to fix those issues.
This would also reduce the image and attack surface and therefore introduce several benefits:
# Stage 1: Build the Vue.js application
FROM node:21-alpine AS build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# Stage 2: Serve the application with Nginx
FROM nginxinc/nginx-unprivileged:1.26-alpine-slim AS production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
tl;dr replace outdated Node.js version and switch from Debian to Alpine Linux based images to reduce image size and attack surface.
Hi, I just discovered this great project.
Please consider building and hosting the docker image using GitHub Actions and the GitHub Container Registery (GHCR).
It would ease the usage of the project significantly.