diff options
author | Hidenori MATSUKI <MATSUKI.Hidenori@gmail.com> | 2018-10-04 08:10:15 +0300 |
---|---|---|
committer | Hidenori MATSUKI <MATSUKI.Hidenori@gmail.com> | 2018-10-04 08:10:15 +0300 |
commit | dc241a6d2b768c37d40302dec84ec9c7f0fb6a7e (patch) | |
tree | 45856c4e73397f2792dfaeb2d1fff5c26b6c2c66 | |
parent | 9ede6b1e9d3c5ea65aeca56a60ca6b11c678f8cf (diff) |
Use docker-compose.
-rw-r--r-- | example-site/.gitignore | 1 | ||||
-rw-r--r-- | example-site/Dockerfile | 14 | ||||
-rw-r--r-- | example-site/docker-compose.yml | 10 |
3 files changed, 25 insertions, 0 deletions
diff --git a/example-site/.gitignore b/example-site/.gitignore new file mode 100644 index 0000000..87174b6 --- /dev/null +++ b/example-site/.gitignore @@ -0,0 +1 @@ +/public/ diff --git a/example-site/Dockerfile b/example-site/Dockerfile new file mode 100644 index 0000000..e3a2b9d --- /dev/null +++ b/example-site/Dockerfile @@ -0,0 +1,14 @@ +FROM ubuntu:18.04@sha256:de774a3145f7ca4f0bd144c7d4ffb2931e06634f11529653b23eba85aef8e378 +MAINTAINER "Hidenori MATSUKI <matsuki.hidenori+docker@gmail.com>" + +ENV DOCKERBUILD_HUGO_VERSION="0.49" +ENV DEBIAN_FRONTEND="noninteractive" + +RUN : 'Install packages' \ + && apt update \ + && apt install -y --no-install-recommends ca-certificates openssh-client curl git \ + && : 'Download and install Hugo' \ + && curl -LO "https://github.com/gohugoio/hugo/releases/download/v${DOCKERBUILD_HUGO_VERSION}/hugo_${DOCKERBUILD_HUGO_VERSION}_Linux-64bit.deb" \ + && dpkg -i hugo_${DOCKERBUILD_HUGO_VERSION}_Linux-64bit.deb \ + && : 'Clean up' \ + && apt clean diff --git a/example-site/docker-compose.yml b/example-site/docker-compose.yml new file mode 100644 index 0000000..2090ec7 --- /dev/null +++ b/example-site/docker-compose.yml @@ -0,0 +1,10 @@ +version: '2' +services: + website: + build: . + working_dir: /PWD + command: hugo server --bind 0.0.0.0 --buildDrafts + volumes: + - ./:/PWD + ports: + - '1313:1313' |