Skip to content

Instantly share code, notes, and snippets.

@sekika
Created May 16, 2024 19:04
Show Gist options
  • Save sekika/ea00060e4c56269b2b4d24ba16fae7c6 to your computer and use it in GitHub Desktop.
Save sekika/ea00060e4c56269b2b4d24ba16fae7c6 to your computer and use it in GitHub Desktop.
Dockerfile for jekyll
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