Skip to content

corpusops/docker-hugo

Repository files navigation

docker-hugo setup

Use

  • Integrate the compose setup to your hugo project root:
git submodule add https://github.com/corpusops/docker-hugo.git local/docker-hugo
ln -fs local/docker-hugo/docker-compose.yml
cp local/docker-hugo/.env.dist .env.dist
cp .env.dist .env
echo .env >> .gitignore
git add .env.dist docker-compose.yml
$EDITOR .env
docker-compose build

Run with docker-compose

server

cp .env.dist .env
HUGO_GID=$(id -g) HUGO_UID=$(id -u) \
    docker-compose up -d

Generate

HUGO_GID=$(id -g) HUGO_UID=$(id -u) \
    docker-compose run --rm hugo hugo_extended

shell

HUGO_GID=$(id -g) HUGO_UID=$(id -u) \
    docker-compose up -d hugo bash

Run with docker

server

docker run -it --rm \
	-e HUGO_UID=$(id -u) -e HUGO_GID=$(id -g)  \
	-v $PWD:/home/hugo/hugo corpusops/hugo

Generate

docker run -it --rm \
	-e HUGO_UID=$(id -u) -e HUGO_GID=$(id -g)  \
	-v $PWD:/home/hugo/hugo corpusops/hugo hugo_extended

shell

docker run -it --rm \
	-e HUGO_UID=$(id -u) -e HUGO_GID=$(id -g)  \
	-v $PWD:/home/hugo/hugo corpusops/hugo bash

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published