1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2025-01-08 04:04:42 +02:00
This commit is contained in:
kev 2015-10-19 00:33:01 +08:00
parent 98b12ae572
commit dec6dbc321
8 changed files with 83 additions and 0 deletions

8
hugo/Dockerfile Normal file
View File

@ -0,0 +1,8 @@
#
# Dockerfile for hugo
#
FROM scratch
COPY hugo /
WORKDIR /www
ENTRYPOINT ["/hugo"]

63
hugo/README.md Normal file
View File

@ -0,0 +1,63 @@
hugo
====
![](https://badge.imagelayers.io/vimagick/hugo:latest.svg)
[hugo][1] makes the web fun again.
## Directory Tree
```
~/fig/hugo/
|-- docker-compose.yml
`-- www/
`-- themes/
`-- hyde/
```
## docker-compose.yml
```
hugo:
image: vimagick/hugo
command: >
server --bind=0.0.0.0
--port=80
--baseUrl=http://blog.datageek.info/
--theme=hyde
--watch
ports:
- "80:80"
volumes:
- ./www:/www
restart: always
```
> **WARNING:** `hugo server` is for testing purpose.
> The default value of `--baseUrl` option is `http://<bind>:<port>/`.
> I set it to the same value as that in `config.toml` here.
> It maybe not a good practice.
## Up and Running
```
$ alias hugo='docker run --rm -v `pwd`:/www vimagick/hugo'
$ cd ~/fig/hugo/www
$ curl -L https://github.com/spf13/hyde/archive/master.tar.gz | tar xz --strip 1 -C ./themes/hyde/
$ hugo new site .
$ vim config.toml
$ hugo new post/hello-world.md
$ vim content/post/hello-world.md
$ docker-compose up -d
$ hugo
```
> The last `hugo` command will use `baseurl` in `config.toml`.
Open <http://blog.datageek.info/> in your browser!
[1]: http://gohugo.io/

12
hugo/docker-compose.yml Normal file
View File

@ -0,0 +1,12 @@
hugo:
image: vimagick/hugo-arm
command: >
server --bind=0.0.0.0
--port=80
--baseUrl=http://192.168.1.230/
--watch
ports:
- "80:80"
volumes:
- ./www:/www
restart: always

BIN
hugo/hugo Executable file

Binary file not shown.