You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run it locally with the following command. Beware that `--rmi` automatically removes the built image when the container stops, so you either have to rebuild it or remove the parameter from the command.
73
+
Run it locally:
72
74
73
75
```bash
74
-
podman run --rm --rmi --interactive --publish 8080:8080 localhost/puzzle/amm-techlab
76
+
podman run --rm --rmi --publish 8080:8080 localhost/puzzle/amm-techlab
75
77
```
76
78
79
+
**Note:** Beware that `--rmi` automatically removes the built image when the container stops, so you either have to rebuild it or remove the parameter from the command.
80
+
77
81
78
82
## How to develop locally
79
83
80
84
To develop locally we don't want to rebuild the entire container image every time something changed, and it is also important to use the same hugo versions like in production.
81
85
We simply mount the working directory into a running container, where hugo is started in the server mode.
82
86
83
87
```bash
84
-
export HUGO_VERSION=$(grep "FROM docker.io/klakegg/hugo" Dockerfile | sed 's/FROM docker.io\/klakegg\/hugo://g'| sed 's/ AS builder//g')
85
-
docker run --rm --interactive --publish 8080:8080 -v $(pwd):/src docker.io/klakegg/hugo:${HUGO_VERSION} server -p 8080 --bind 0.0.0.0
88
+
export HUGO_VERSION=$(grep "FROM docker.io/floryn90/hugo" Dockerfile | sed 's/FROM docker.io\/floryn90\/hugo://g'| sed 's/ AS builder//g')
89
+
docker run --rm --publish 8080:8080 -v $(pwd):/src docker.io/floryn90/hugo:${HUGO_VERSION} server -p 8080
86
90
```
87
91
88
-
use the following command to set the hugo environment
92
+
Use the following command to set the hugo environment
89
93
90
94
```bash
91
-
export HUGO_VERSION=$(grep "FROM docker.io/klakegg/hugo" Dockerfile | sed 's/FROM docker.io\/klakegg\/hugo://g'| sed 's/ AS builder//g')
92
-
docker run --rm --interactive --publish 8080:8080 -v $(pwd):/src docker.io/klakegg/hugo:${HUGO_VERSION} server --environment=<environment> -p 8080 --bind 0.0.0.0
95
+
export HUGO_VERSION=$(grep "FROM docker.io/floryn90/hugo" Dockerfile | sed 's/FROM docker.io\/floryn90\/hugo://g'| sed 's/ AS builder//g')
96
+
docker run --rm --publish 8080:8080 -v $(pwd):/src docker.io/floryn90/hugo:${HUGO_VERSION} server --environment=<environment> -p 8080
93
97
```
94
98
95
99
@@ -108,8 +112,14 @@ npm run mdlint
108
112
Npm not installed? no problem
109
113
110
114
```bash
111
-
export HUGO_VERSION=$(grep "FROM docker.io/klakegg/hugo" Dockerfile | sed 's/FROM docker.io\/klakegg\/hugo://g'| sed 's/ AS builder//g')
112
-
docker run --rm --interactive -v $(pwd):/src docker.io/klakegg/hugo:${HUGO_VERSION}-ci /bin/bash -c "set -euo pipefail;npm install; npm run mdlint;"
115
+
export HUGO_VERSION=$(grep "FROM docker.io/floryn90/hugo" Dockerfile | sed 's/FROM docker.io\/floryn90\/hugo://g'| sed 's/ AS builder//g')
116
+
docker run --rm -v $(pwd):/src docker.io/floryn90/hugo:${HUGO_VERSION}-ci /bin/bash -c "npm install && npm run mdlint"
0 commit comments