Skip to content

Commit

Permalink
Merge pull request #7 from AaronForce1/master
Browse files Browse the repository at this point in the history
Version 0.54.0
  • Loading branch information
klakegg authored Feb 21, 2019
2 parents d2ba413 + e459063 commit 74d9100
Show file tree
Hide file tree
Showing 10 changed files with 98 additions and 22 deletions.
4 changes: 2 additions & 2 deletions Dockerfile-base
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM busybox:1.28 AS fetch-standard

ARG VERSION=0.53
ARG VERSION=0.54.0

ADD https://github.com/gohugoio/hugo/releases/download/v${VERSION}/hugo_${VERSION}_Linux-64bit.tar.gz /hugo.tar.gz
RUN tar -zxvf hugo.tar.gz
Expand All @@ -10,7 +10,7 @@ RUN ["/hugo", "version"]

FROM busybox:1.28 AS fetch-extended

ARG VERSION=0.53
ARG VERSION=0.54.0

ADD https://github.com/gohugoio/hugo/releases/download/v${VERSION}/hugo_extended_${VERSION}_Linux-64bit.tar.gz /hugo.tar.gz
RUN tar -zxvf hugo.tar.gz
Expand Down
30 changes: 18 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,38 @@ These images sets `destination` during build and `bind` when started as server,
## Available tags

Default minimal image based upon [Busybox](https://hub.docker.com/r/_/busybox/):
* Hugo 0.53: `0.53-busybox`, `busybox`, `0.53`, `latest`, `0.53-busybox-onbuild`, `0.53-onbuild`, `busybox-onbuild`, `onbuild` ([Dockerfile](https://github.com/klakegg/docker-hugo/blob/0.53/dist/busybox/Dockerfile-busybox))
* Hugo 0.54.0: `0.54.0-busybox`, `busybox`, `0.54.0`, `latest`, `0.54.0-busybox-onbuild`, `0.54.0-onbuild`, `busybox-onbuild`, `onbuild` ([Dockerfile](https://github.com/klakegg/docker-hugo/blob/0.54.0/dist/busybox/Dockerfile-busybox)
* Hugo 0.53: `0.53-busybox`, `0.53`, `0.53-busybox-onbuild`, `0.53-onbuild`, ([Dockerfile](https://github.com/klakegg/docker-hugo/blob/0.53/dist/busybox/Dockerfile-busybox))
* Hugo 0.52: `0.52-busybox`, `0.52`, `0.52-busybox-onbuild`, `0.52-onbuild` ([Dockerfile](https://github.com/klakegg/docker-hugo/blob/0.52/dist/busybox/Dockerfile-busybox))
* Hugo 0.51: `0.51-busybox`, `0.51`, `0.51-busybox-onbuild`, `0.51-onbuild` ([Dockerfile](https://github.com/klakegg/docker-hugo/blob/0.51/dist/busybox/Dockerfile-busybox))

Minimal image based upon [Alpine](https://hub.docker.com/r/_/alpine/):
* Hugo 0.53: `0.53-alpine`, `alpine`, `0.53-alpine-onbuild`, `alpine-onbuild`, `0.53-ext-alpine`, `ext-alpine`, `0.53-ext-alpine-onbuild`, `ext-alpine-onbuild` ([Dockerfile](https://github.com/klakegg/docker-hugo/blob/0.53/dist/alpine/Dockerfile-alpine))
* Hugo 0.54.0: `0.54.0-alpine`, `alpine`, `0.54.0-alpine-onbuild`, `alpine-onbuild`, `0.54.0-ext-alpine`, `ext-alpine`, `0.54.0-ext-alpine-onbuild`, `ext-alpine-onbuild`, `0.54.0-ext-nodejs`, `ext-nodejs` ([Dockerfile](https://github.com/klakegg/docker-hugo/blob/0.54.0/dist/alpine/Dockerfile-alpine))
* Hugo 0.53: `0.53-alpine`, `0.53-alpine-onbuild`, `0.53-ext-alpine`, `0.53-ext-alpine-onbuild` ([Dockerfile](https://github.com/klakegg/docker-hugo/blob/0.53/dist/alpine/Dockerfile-alpine))
* Hugo 0.52: `0.52-alpine`, `0.52-alpine-onbuild`, `0.52-ext-alpine`, `0.52-ext-alpine-onbuild` ([Dockerfile](https://github.com/klakegg/docker-hugo/blob/0.52/dist/alpine/Dockerfile-alpine))
* Hugo 0.51: `0.51-alpine`, `0.51-alpine-onbuild`, `0.51-ext-alpine`, `0.51-ext-alpine-onbuild` ([Dockerfile](https://github.com/klakegg/docker-hugo/blob/0.51/dist/alpine/Dockerfile-alpine))

Minimal image based upon [Alpine](https://hub.docker.com/r/_/alpine/) with [Asciidoctor](http://asciidoctor.org/) installed:
* Hugo 0.53: `0.53-asciidoctor`, `asciidoctor`, `0.53-asciidoctor-onbuild`, `asciidoctor-onbuild`, `0.53-ext-asciidoctor`, `ext-asciidoctor`, `0.53-ext-asciidoctor-onbuild`, `ext-asciidoctor-onbuild` ([Dockerfile](https://github.com/klakegg/docker-hugo/blob/0.53/dist/alpine/Dockerfile-asciidoctor))
* Hugo 0.54.0: `0.54.0-asciidoctor`, `asciidoctor`, `0.54.0-asciidoctor-onbuild`, `asciidoctor-onbuild`, `0.54.0-ext-asciidoctor`, `ext-asciidoctor`, `0.54.0-ext-asciidoctor-onbuild`, `ext-asciidoctor-onbuild` ([Dockerfile](https://github.com/klakegg/docker-hugo/blob/0.54.0/dist/alpine/Dockerfile-asciidoctor))
* Hugo 0.53: `0.53-asciidoctor`, `0.53-asciidoctor-onbuild`, `0.53-ext-asciidoctor`, `0.53-ext-asciidoctor-onbuild` ([Dockerfile](https://github.com/klakegg/docker-hugo/blob/0.53/dist/alpine/Dockerfile-asciidoctor)
* Hugo 0.52: `0.52-asciidoctor`, `0.52-asciidoctor-onbuild`, `0.52-ext-asciidoctor`, `0.52-ext-asciidoctor-onbuild` ([Dockerfile](https://github.com/klakegg/docker-hugo/blob/0.52/dist/alpine/Dockerfile-asciidoctor))
* Hugo 0.51: `0.51-asciidoctor`, `0.51-asciidoctor-onbuild`, `0.51-ext-asciidoctor`, `0.51-ext-asciidoctor-onbuild` ([Dockerfile](https://github.com/klakegg/docker-hugo/blob/0.51/dist/alpine/Dockerfile-asciidoctor))

Minimal image based upon [Alpine](https://hub.docker.com/r/_/alpine/) with [Pandoc](https://pandoc.org/) installed:
* Hugo 0.53: `0.53-pandoc`, `pandoc`, `0.53-pandoc-onbuild`, `pandoc-onbuild`, `0.53-ext-pandoc`, `ext-pandoc`, `0.53-ext-pandoc-onbuild`, `ext-asciidoctor-onbuild` ([Dockerfile](https://github.com/klakegg/docker-hugo/blob/0.53/dist/alpine/Dockerfile-pandoc))
* Hugo 0.54.0: `0.54.0-pandoc`, `pandoc`, `0.54.0-pandoc-onbuild`, `pandoc-onbuild`, `0.54.0-ext-pandoc`, `ext-pandoc`, `0.54.0-ext-pandoc-onbuild`, `ext-asciidoctor-onbuild` ([Dockerfile](https://github.com/klakegg/docker-hugo/blob/0.54.0/dist/alpine/Dockerfile-pandoc)
* Hugo 0.53: `0.53-pandoc`, `0.53-pandoc-onbuild`, `0.53-ext-pandoc`, `0.53-ext-pandoc-onbuild` ([Dockerfile](https://github.com/klakegg/docker-hugo/blob/0.53/dist/alpine/Dockerfile-pandoc)
* Hugo 0.52: `0.52-pandoc`, `0.52-pandoc-onbuild`, `0.52-ext-pandoc`, `0.52-ext-pandoc-onbuild` ([Dockerfile](https://github.com/klakegg/docker-hugo/blob/0.52/dist/alpine/Dockerfile-pandoc))
* Hugo 0.51: `0.51-pandoc`, `0.51-pandoc-onbuild`, `0.51-ext-pandoc`, `0.51-ext-pandoc-onbuild` ([Dockerfile](https://github.com/klakegg/docker-hugo/blob/0.51/dist/alpine/Dockerfile-pandoc))

Image based upon [Debian](https://hub.docker.com/r/_/debian/):
* Hugo 0.53: `0.53-debian`, `debian`, `0.53-debian-onbuild`, `debian-onbuild`, `0.53-ext`, `ext`, `latest-ext`, `0.53-ext-debian`, `ext-debian`, `0.53-ext-debian-onbuild`, `ext-debian-onbuild`, `0.53-ext-onbuild`, `ext-onbuild` ([Dockerfile](https://github.com/klakegg/docker-hugo/blob/0.53/dist/debian/Dockerfile-debian))
* Hugo 0.54.0: `0.54.0-debian`, `debian`, `0.54.0-debian-onbuild`, `debian-onbuild`, `0.54.0-ext`, `ext`, `latest-ext`, `0.54.0-ext-debian`, `ext-debian`, `0.54.0-ext-debian-onbuild`, `ext-debian-onbuild`, `0.54.0-ext-onbuild`, `ext-onbuild` ([Dockerfile](https://github.com/klakegg/docker-hugo/blob/0.54.0/dist/debian/Dockerfile-debian))
* Hugo 0.53: `0.53-debian`, `0.53-debian-onbuild`, `0.53-ext`, `0.53-ext-debian`, `0.53-ext-debian-onbuild`, `0.53-ext-onbuild` ([Dockerfile](https://github.com/klakegg/docker-hugo/blob/0.53/dist/debian/Dockerfile-debian)
* Hugo 0.52: `0.52-debian`, `0.52-debian-onbuild`, `0.52-ext`, `0.52-ext-debian`, `0.52-ext-debian-onbuild`, `0.52-ext-onbuild` ([Dockerfile](https://github.com/klakegg/docker-hugo/blob/0.52/dist/debian/Dockerfile-debian))
* Hugo 0.51: `0.51-debian`, `0.51-debian-onbuild`, `0.51-ext`, `0.51-ext-debian`, `0.51-ext-debian-onbuild`, `0.51-ext-onbuild` ([Dockerfile](https://github.com/klakegg/docker-hugo/blob/0.51/dist/debian/Dockerfile-debian))

Image based upon [Ubuntu](https://hub.docker.com/r/_/ubuntu/):
* Hugo 0.53: `0.53-ubuntu`, `ubuntu`, `0.53-ubuntu-onbuild`, `ubuntu-onbuild`, `0.53-ext-ubuntu`, `ext-ubuntu`, `0.53-ext-ubuntu-onbuild`, `ext-ubuntu-onbuild` ([Dockerfile](https://github.com/klakegg/docker-hugo/blob/0.53/dist/ubuntu/Dockerfile-ubuntu))
* Hugo 0.54.0: `0.54.0-ubuntu`, `ubuntu`, `0.54.0-ubuntu-onbuild`, `ubuntu-onbuild`, `0.54.0-ext-ubuntu`, `ext-ubuntu`, `0.54.0-ext-ubuntu-onbuild`, `ext-ubuntu-onbuild` ([Dockerfile](https://github.com/klakegg/docker-hugo/blob/0.54.0/dist/ubuntu/Dockerfile-ubuntu))
* Hugo 0.53: `0.53-ubuntu`, `0.53-ubuntu-onbuild`, `0.53-ext-ubuntu`, `0.53-ext-ubuntu-onbuild` ([Dockerfile](https://github.com/klakegg/docker-hugo/blob/0.52/dist/ubuntu/Dockerfile-ubuntu)))
* Hugo 0.52: `0.52-ubuntu`, `0.52-ubuntu-onbuild`, `0.52-ext-ubuntu`, `0.52-ext-ubuntu-onbuild` ([Dockerfile](https://github.com/klakegg/docker-hugo/blob/0.52/dist/ubuntu/Dockerfile-ubuntu))
* Hugo 0.51: `0.51-ubuntu`, `0.51-ubuntu-onbuild`, `0.51-ext-ubuntu`, `0.51-ext-ubuntu-onbuild` ([Dockerfile](https://github.com/klakegg/docker-hugo/blob/0.51/dist/ubuntu/Dockerfile-ubuntu))

Expand Down Expand Up @@ -72,7 +78,7 @@ Normal build:

```yaml
build:
image: klakegg/hugo:0.53
image: klakegg/hugo:0.54.0
volumes:
- .:/src
- ./output:/target
Expand All @@ -82,7 +88,7 @@ Run server:
```yaml
server:
image: klakegg/hugo:0.53
image: klakegg/hugo:0.54.0
command: server
volumes:
- .:/src
Expand Down Expand Up @@ -117,7 +123,7 @@ Table of Hugo extention features and the version when images first support the f
| ------------- | ------ | ------- | ------ | ------ |
| Hugo extended | 0.43 | - | 0.43 | 0.43 |
| PostCSS | - | - | 0.43 | 0.43 |

| NodeJS/Yarn | 0.54.0 | - | 0.54.0 | 0.54.0 |

## Using an ONBUILD image

Expand All @@ -126,7 +132,7 @@ The onbuild images adds content of the folder of your Dockerfile into `/src` and
Example Dockerfile for your project where the site is made into an nginx image (Docker 17.05-ce or newer):

```Dockerfile
FROM klakegg/hugo:0.53-onbuild AS hugo
FROM klakegg/hugo:0.54.0-onbuild AS hugo

FROM nginx
COPY --from=hugo /onbuild /usr/share/nginx/html
Expand Down Expand Up @@ -155,14 +161,14 @@ Those wanting to override entrypoint in the image may easily do so.
On command line using `--entrypoint`:

```
docker run --rm -it -v $(pwd):/src -v $(pwd)/output:/src/public --entrypoint hugo klakegg/hugo:0.53
docker run --rm -it -v $(pwd):/src -v $(pwd)/output:/src/public --entrypoint hugo klakegg/hugo:0.54.0
```

In docker-compose using `entrypoint`:

```yaml
build:
image: klakegg/hugo:0.53
image: klakegg/hugo:0.54.0
entrypoint: hugo
volumes:
- .:/src
Expand Down
41 changes: 41 additions & 0 deletions dist/alpine/Dockerfile-ext-nodejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
FROM klakegg/hugo:base AS base

FROM klakegg/hugo:base-certs as certs

FROM klakegg/hugo:base-nodejs as node

FROM ubuntu:18.04 AS ubuntu

FROM scratch as image

COPY files /files
COPY --from=base /bin/hugo-extended /files/bin/hugo
COPY --from=certs /etc/ssl/certs /files/etc/ssl/certs
COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25 /files/usr/lib/libstdc++.so.6
COPY --from=node /node /files/
CMD ln -s /files/node/bin/node /files/bin/node \
&& ln -s /files/node/bin/npm /files/bin/npm \
&& ln -s /files/node/bin/npx /files/bin/npx

FROM frolvlad/alpine-glibc:alpine-3.8

ENV HUGO_BIND="0.0.0.0" \
HUGO_DESTINATION="/target" \
HUGO_ENV="DEV"

RUN apk add --no-cache libstdc++ busybox-suid bash bash-completion

COPY --from=image /files /

RUN ["node", "-v"]
RUN npm install --global yarn

RUN mkdir /etc/bash_completion.d \
&& hugo gen autocomplete > /dev/null

EXPOSE 1313

VOLUME /src /target
WORKDIR /src

ENTRYPOINT ["sh", "/run.sh"]
4 changes: 4 additions & 0 deletions dist/alpine/Step-build
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ build "pandoc-onbuild" - \
build "ext-alpine" - \
"[version]-ext-alpine"

# Alpine + Hugo extended + Nodejs
build "ext-nodejs" - \
"[version]-ext-nodejs"

# Alpine + Hugo extended + Onbuild
template onbuild ext-alpine-onbuild ext-alpine
build "ext-alpine-onbuild" - \
Expand Down
2 changes: 2 additions & 0 deletions dist/alpine/Step-test
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ test "alpine" "" "version" "Hugo"

test "ext-alpine" "" "version" "Hugo"

test "ext-nodejs" "--entrypoint node" "--version"

test "asciidoctor" "--entrypoint asciidoctor" "--version" "Asciidoctor 1"

test "pandoc" "--entrypoint pandoc-default" "--version" "Compiled with pandoc"
3 changes: 2 additions & 1 deletion dist/debian/Dockerfile-ext-debian
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ COPY --from=image /files /

RUN apt update \
&& apt install -y curl gnupg bash-completion \
&& curl -sL https://deb.nodesource.com/setup_10.x | bash - \
&& curl -sL https://deb.nodesource.com/setup_11.x | bash - \
&& apt install -y nodejs \
&& npm install -g postcss-cli \
&& npm install -g yarn \
&& apt remove -y curl gnupg apt-transport-https lsb-release \
&& apt autoremove -y \
&& rm -rf /var/lib/apt/lists/* \
Expand Down
3 changes: 2 additions & 1 deletion dist/ubuntu/Dockerfile-ext-ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ COPY files /

RUN apt update \
&& apt install -y curl gnupg bash-completion \
&& curl -sL https://deb.nodesource.com/setup_10.x | bash - \
&& curl -sL https://deb.nodesource.com/setup_11.x | bash - \
&& apt install -y nodejs \
&& npm install -g postcss-cli \
&& npm install -g yarn \
&& apt remove -y curl gnupg apt-transport-https lsb-release \
&& apt autoremove -y \
&& rm -rf /var/lib/apt/lists/* \
Expand Down
Loading

0 comments on commit 74d9100

Please sign in to comment.