Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# making updates to the accumulo website without requiring the dev
# to maintain a local ruby development environment.

FROM ruby:3.2.2-slim-bullseye as base
FROM ruby:3.2.2-slim-bullseye AS base

RUN apt-get update && apt-get install -y --no-install-recommends \
RUN apt update && apt install -y --no-install-recommends \
build-essential \
git \
curl \
Expand All @@ -17,13 +17,14 @@ WORKDIR /mnt/workdir
# from the mounted directory. But that's not available during the
# docker build, so we need to copy them in to pre-install the Gems

COPY Gemfile ./Gemfile
COPY Gemfile.lock ./Gemfile.lock
COPY Gemfile Gemfile.lock ./

# Gems will be installed under GEM_HOME which is set by the ruby image.
# See https://hub.docker.com/_/ruby for details.

RUN gem update --system && bundle install && gem cleanup
RUN gem update --system \
&& bundle install \
&& gem cleanup

ENV HOST=0.0.0.0
ENV PORT=4000
Expand Down
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,6 @@ Jekyll will print a local URL where the site can be viewed (usually,

### Testing using Docker environment

A containerized development environment can be built using the local
Dockerfile.


A containerized development environment can be built using the local
Dockerfile. You can build it with the following command:

Expand All @@ -123,7 +119,8 @@ docker build -t webdev .
This action will produce a `webdev` image, with all the website's build
prerequisites preinstalled. When a container is run from this image, it
will perform a `jekyll serve` command with the polling option enabled,
so that changes you make locally will be immediately reflected.
so that changes you make locally will be immediately reflected after
reloading the page in your browser.

When you run a container using the webdev image, your current working
directory will be mounted, so that any changes made by the build inside
Expand All @@ -137,20 +134,22 @@ docker run -d -v "$PWD":/mnt/workdir -p 4000:4000 webdev
While this container is running, you will be able to review the rendered website
in your local browser at [http://127.0.0.1:4000/](http://127.0.0.1:4000/).


Shell access can be obtained by overriding the default container command.

This is useful for adding new gems, or modifying the Gemfile.lock for updating
existing dependencies.

When using shell access the local directory must be mounted to ensure
When using shell access, the local directory must be mounted to ensure
the Gemfile and Gemfile.lock updates are reflected in your local
environment so you can create a commit and submit a PR.

```bash
docker run -v "$PWD":/mnt/workdir -it webdev /bin/bash
```

You may need to manually delete the `_site` or `.jekyll-cache` directories if
they already exist and are causing issues with the build.

## Publishing

Changes pushed to our `main` branch will automatically trigger Jekyll to
Expand Down