Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consider building and hosting docker image #27

Closed
AdrianDsg opened this issue May 8, 2024 · 1 comment · Fixed by #28
Closed

consider building and hosting docker image #27

AdrianDsg opened this issue May 8, 2024 · 1 comment · Fixed by #28
Labels
enhancement New feature or request

Comments

@AdrianDsg
Copy link
Contributor

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.

@AdrianDsg
Copy link
Contributor Author

AdrianDsg commented May 15, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants