Created
May 16, 2024 19:04
-
-
Save sekika/ea00060e4c56269b2b4d24ba16fae7c6 to your computer and use it in GitHub Desktop.
Dockerfile for jekyll
This file contains hidden or 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 ruby:alpine | |
# Install package | |
RUN apk update && apk --no-cache upgrade && \ | |
apk add --no-cache build-base | |
# Copy entrypoint script and set permissions | |
COPY entrypoint.sh /bin/entrypoint.sh | |
RUN chmod +x /bin/entrypoint.sh | |
# Create a new user and switch to it | |
RUN addgroup -S jekyll && adduser -S jekyll -G jekyll && \ | |
mkdir /jekyll && chown jekyll:jekyll /jekyll | |
USER jekyll | |
# Start Jekyll | |
WORKDIR /jekyll | |
ENTRYPOINT ["/bin/entrypoint.sh"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment