Skip to content

Commit 00a343e

Browse files
authored
Improve documentation about Docker
1 parent 35ec471 commit 00a343e

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

README.md

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,32 @@ To build and view the site locally:
1515

1616
For more details, read on.
1717

18-
## Quickstart with Docker ##
18+
## Quickstart with Docker Compose ##
1919

20-
To build and view site with Docker:
20+
You need to have [Docker Engine](https://docs.docker.com/engine/) and [Docker Compose](https://docs.docker.com/compose/) installed on your machine.
21+
Under macOS (Intel or Apple silicon), instead of installing [Docker Desktop](https://docs.docker.com/desktop/) you can also use [HomeBrew](https://brew.sh/) with [Colima](https://github.com/abiosoft/colima): `brew install colima docker`.
22+
UID and GID environment variables are needed to avoid docker from writing files as root in your directory.
2123

22-
env UID="$(id -u)" GID="$(id -g)" docker-compose up
24+
```
25+
env UID="$(id -u)" GID="$(id -g)" docker-compose up
26+
```
2327

24-
It will incrementally build and serve site at `http://localhost:4000`.
28+
The generated site is available at `http://localhost:4000`.
2529

26-
In case the Dockerfile changed, re-build it with:
30+
When the website dependencies change (the content of the `Gemfile`),
31+
you have to re-build the Docker image:
2732

28-
env UID="$(id -u)" GID="$(id -g)" docker-compose up --build
33+
```
34+
env UID="$(id -u)" GID="$(id -g)" docker-compose up --build
35+
```
2936

30-
For more details on the Docker option, see [this issue](https://github.com/scala/docs.scala-lang/issues/1286).
37+
If you have problems with the Docker image or want to force the rebuild of the Docker image:
38+
```
39+
env UID="$(id -u)" GID="$(id -g)" docker-compose build --no-cache
40+
```
41+
42+
43+
For more details on the Docker option, see also [this issue](https://github.com/scala/docs.scala-lang/issues/1286).
3144

3245
## Contributing ##
3346

0 commit comments

Comments
 (0)