Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Commit

Permalink
Merge pull request from GHSA-8wxq-346h-xmr8
Browse files Browse the repository at this point in the history
Hide nginx version from the dockerfile headers
  • Loading branch information
bartvanb authored Jan 19, 2024
2 parents d1cf36c + 7fbfde9 commit 92e0fb5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,10 @@ RUN npm run build --prod
FROM nginx:alpine
COPY --from=node /app/dist/vantage6-UI /usr/share/nginx/html


# add option to not share server info to nginx config file. Be sure to do this
# in the http block, which is achieved by matching that line
RUN sed -i '/http {/a \ \ \ \ server_tokens off;' /etc/nginx/nginx.conf

# When the container starts, replace the env.js with values from environment variables and then startup app
CMD ["/bin/sh", "-c", "envsubst < /usr/share/nginx/html/assets/env.template.js > /usr/share/nginx/html/assets/env.js && exec nginx -g 'daemon off;'"]

0 comments on commit 92e0fb5

Please sign in to comment.