Skip to content

Commit cbd80f1

Browse files
committed
Switch from floryn90/hugo to hugomods/hugo image
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.
1 parent 80b4992 commit cbd80f1

File tree

3 files changed

+8
-21
lines changed

3 files changed

+8
-21
lines changed

Dockerfile

-4
This file was deleted.

README.md

+2-10
Original file line numberDiff line numberDiff line change
@@ -69,20 +69,12 @@ than [Docker Desktop](https://www.docker.com/products/docker-desktop) on
6969
Windows and Mac, and [Docker Compose](https://docs.docker.com/compose/install/)
7070
on Linux.
7171

72-
1. Build the docker image
73-
74-
```bash
75-
docker-compose build
76-
```
77-
78-
1. Run the built image
72+
1. Spin up the service
7973

8074
```bash
8175
docker-compose up
8276
```
8377

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

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

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

97-
To remove the produced images run:
89+
To remove the produced container run:
9890

9991
```bash
10092
docker-compose rm

docker-compose.yaml

+6-7
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@ version: "3.8"
33
services:
44

55
site:
6-
image: docsy/docsy-example
7-
build:
8-
context: .
9-
command: server
10-
ports:
11-
- "1313:1313"
6+
image: hugomods/hugo:std-exts
7+
command: server -D
128
volumes:
13-
- .:/src
9+
- ./:/src
10+
- ~/hugo_cache:/tmp/hugo_cache
11+
ports:
12+
- 1313:1313

0 commit comments

Comments
 (0)