diff --git a/scripts/Dockerfile b/scripts/Dockerfile new file mode 100644 index 000000000..888a811ad --- /dev/null +++ b/scripts/Dockerfile @@ -0,0 +1,17 @@ +# Use the official Jekyll image from Docker Hub +FROM jekyll/jekyll:latest + +# Set the working directory +WORKDIR /srv/jekyll + +# Copy the current directory contents into the container at /srv/jekyll +COPY . /srv/jekyll + +# Install any needed packages specified in Gemfile +RUN bundle install + +# Expose port 4000 to the host +EXPOSE 4000 + +# Run Jekyll server +CMD ["jekyll", "serve", "--host", "0.0.0.0"] diff --git a/scripts/build.sh b/scripts/build.sh new file mode 100644 index 000000000..d4622fae4 --- /dev/null +++ b/scripts/build.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +# Build the Docker image +docker build -t my-jekyll-site -f scripts/Dockerfile . diff --git a/scripts/run.sh b/scripts/run.sh new file mode 100644 index 000000000..d1036ecb4 --- /dev/null +++ b/scripts/run.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +# Run the Docker container +docker run --rm -v "$PWD:/srv/jekyll" -p 4000:4000 my-jekyll-site