🐳 Truly minimal Docker images for Hugo.
docker pull getting/hugo:${tag}
docker build --rm -t getting/hugo:latest .
注:中国大陆网络需修改Dockerfile,删除# ENV GOPROXY=https://goproxy.io 行首 #
Create a new site:
docker run --rm -v $(pwd):/page getting/hugo new site ${site_name}
Build static pages:
docker run --rm -v $(pwd):/page getting/hugo
Start the Hugo server:
docker run --rm -it -p 1313:1313 -v $(pwd):/page getting/hugo server -D --bind=0.0.0.0
Command line help:
docker run --rm getting/hugo help
Example in .travis.yml:
language: minimal
branches:
only:
- master
sudo: required
services:
- docker
install:
- docker pull getting/hugo
script:
- docker run --rm -v $(pwd):/page getting/hugo -e blog.sooo.site
deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
keep_history: true
local_dir: public
on:
branch: master
Content type
Image
Digest
Size
13 MB
Last updated
over 6 years ago
docker pull getting/hugo