Created
December 19, 2020 10:52
-
-
Save aryan9600/57639e967ede021d8e7ba257d8abf717 to your computer and use it in GitHub Desktop.
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
FROM node:alpine | |
WORKDIR '/app' | |
COPY ./package.json ./ | |
RUN npm install | |
COPY . . | |
# Add a user group with a group ID of 1001 | |
RUN addgroup -g 1001 ctf | |
# Add a user with a user ID of 1001 and to the ctf user group | |
RUN adduser -u 1001 ctf -G ctf | |
# Set permissions to revoke write access | |
RUN chmod 555 /app | |
# Set default user for container | |
USER ctf | |
EXPOSE 2640 | |
CMD ["node", "app.js"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment