Skip to content

Commit 3d4b4ac

Browse files
committed
Mount local dir and serve in incremental mode for hot reload
I needed to add the podman specific :Z to relabel the volumes, selinux was preventing access by default. Signed-off-by: Robert Young <[email protected]>
1 parent 59b64b6 commit 3d4b4ac

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ RUN ./bootstrap_setup.sh
4242
RUN mkdir /site/
4343
WORKDIR /site/
4444
COPY . .
45-
RUN cp -r /css/_sass/* /site/_sass
4645

4746
EXPOSE 4000
4847

49-
CMD eval "$(rbenv init -)" && bundle exec jekyll serve --host ${JEKYLL_SERVE_BIND}
48+
CMD eval "$(rbenv init -)" && cp -r /css/_sass/* /site/_sass/ && bundle exec jekyll serve --host ${JEKYLL_SERVE_BIND} --incremental

run.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ CONTAINER_ENGINE=${CONTAINER_ENGINE:-podman}
77
RUN_ARGS=()
88
if [ "$OS" = 'Darwin' ]; then
99
RUN_ARGS+=(--env JEKYLL_SERVE_BIND=0.0.0.0 --publish 4000:4000)
10+
elif [ "$CONTAINER_ENGINE" = 'podman' ]; then
11+
RUN_ARGS+=(--net host -v $(pwd):/site/:Z)
1012
else
1113
RUN_ARGS+=(--net host)
1214
fi

0 commit comments

Comments
 (0)