1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2026-01-09 19:52:55 -05:00

change local port from 1313 to make my life easier

[skip ci]
This commit is contained in:
2020-03-03 15:17:19 -05:00
parent f8374d50f4
commit 4b1b2401f8
5 changed files with 97 additions and 91 deletions

View File

@@ -1,7 +1,9 @@
# Usage:
# docker build -t jarv.is:develop -f Dockerfile .
# docker run -v $(pwd):/src -p 1313:1313 jarv.is:develop
# ...then open http://localhost:1313 for the live-refresh server.
# docker build -t jarv.is -f Dockerfile .
# docker run -v $(pwd):/src -p 1337:1337 jarv.is
# ...then open http://localhost:1337 for the live-refresh server.
#
# Based on: https://github.com/jakejarvis/hugo-build-action/blob/master/Dockerfile
FROM alpine:latest
@@ -12,7 +14,11 @@ ENV HUGO_EXTENDED 1
# only install libc6-compat & libstdc++ if we're building extended Hugo
# https://gitlab.com/yaegashi/hugo/commit/22f0d5cbd6114210ba7835468facbdee60609aa2
RUN apk update && \
apk add --no-cache ca-certificates git nodejs ${HUGO_EXTENDED:+libc6-compat libstdc++} && \
apk add --no-cache \
ca-certificates \
git \
nodejs \
${HUGO_EXTENDED:+libc6-compat libstdc++} && \
update-ca-certificates && \
wget https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_EXTENDED:+extended_}${HUGO_VERSION}_Linux-64bit.tar.gz && \
wget https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_checksums.txt && \
@@ -23,14 +29,14 @@ RUN apk update && \
rm -rf hugo_*
# verify everything's OK
RUN /usr/bin/hugo version
RUN hugo version
# add site source as volume
VOLUME /src
WORKDIR /src
# expose live-refresh server
EXPOSE 1313
# expose live-refresh server (on custom port)
EXPOSE 1337
ENTRYPOINT ["/usr/bin/hugo"]
CMD ["server", "--buildDrafts", "--buildFuture", "--bind", "0.0.0.0", "--port", "1313", "--verbose"]
ENTRYPOINT ["hugo"]
CMD ["server", "--buildDrafts", "--buildFuture", "--port", "1337", "--bind", "0.0.0.0", "--verbose"]