Skip to content

Commit

Permalink
Switch from floryn90/hugo to hugomods/hugo image
Browse files Browse the repository at this point in the history
The site build fails since floryn90/hugo v0.134.3:

```
Error: error building site: failed to acquire a build lock: open /src/.hugo_build.lock: permission denied
```

Cause: The Alpine image has switched from root user to hugo user:

floryn90/docker-hugo@b261630

Fix: Switch to hugomods/hugo image that still runs as root user.

The hugomods/hugo:std-exts image has git included making our Dockerfile obsolete.
  • Loading branch information
julianladisch committed Dec 13, 2024
1 parent 80b4992 commit cbd80f1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 21 deletions.
4 changes: 0 additions & 4 deletions Dockerfile

This file was deleted.

12 changes: 2 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,12 @@ than [Docker Desktop](https://www.docker.com/products/docker-desktop) on
Windows and Mac, and [Docker Compose](https://docs.docker.com/compose/install/)
on Linux.

1. Build the docker image

```bash
docker-compose build
```

1. Run the built image
1. Spin up the service

```bash
docker-compose up
```

> NOTE: You can run both commands at once with `docker-compose up --build`.
1. Verify that the service is working.

Open your web browser and type `http://localhost:1313` in your navigation bar,
Expand All @@ -94,7 +86,7 @@ on Linux.

To stop Docker Compose, on your terminal window, press **Ctrl + C**.

To remove the produced images run:
To remove the produced container run:

```bash
docker-compose rm
Expand Down
13 changes: 6 additions & 7 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ version: "3.8"
services:

site:
image: docsy/docsy-example
build:
context: .
command: server
ports:
- "1313:1313"
image: hugomods/hugo:std-exts
command: server -D
volumes:
- .:/src
- ./:/src
- ~/hugo_cache:/tmp/hugo_cache
ports:
- 1313:1313

0 comments on commit cbd80f1

Please sign in to comment.