-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Veinar <[email protected]>
- Loading branch information
Showing
3 changed files
with
36 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Use the NODE_VERSION argument to specify the Node.js version | ||
ARG NODE_VERSION | ||
|
||
# Use the specified Node.js version as the base image | ||
FROM node:${NODE_VERSION}-alpine | ||
|
||
# Set Node args | ||
ENV NODE_OPTIONS=--openssl-legacy-provider | ||
|
||
RUN apk add --update autoconf automake build-base libtool nasm pkgconf && \ | ||
rm -rf /var/cache/apk/* | ||
|
||
# Setup work directory | ||
WORKDIR /gitops-website | ||
|
||
# Set permissions for non-root user | ||
RUN chown -R node:node /gitops-website | ||
|
||
# Switch user to non-root | ||
USER node | ||
|
||
# Add repo files with correct user:group ownership | ||
ADD --chown=node:node . . | ||
|
||
# Install dependencies | ||
RUN npm ci | ||
|
||
# Expose port for server | ||
EXPOSE 8000 | ||
|
||
# Create entrypoint | ||
ENTRYPOINT ["npm", "start"] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters