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.
86
+
Run it locally:
83
87
84
88
```bash
85
-
podman run --rm --rmi --interactive --publish 8080:8080 localhost/puzzle/jenkins-techlab
89
+
podman run --rm --rmi --publish 8080:8080 localhost/puzzle/jenkins-techlab
86
90
```
87
91
92
+
**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.
93
+
88
94
89
95
## How to develop locally
90
96
91
97
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.
92
98
We simply mount the working directory into a running container, where hugo is started in the server mode.
93
99
94
100
```bash
95
-
export HUGO_VERSION=$(grep "FROM klakegg/hugo" Dockerfile | sed 's/FROM klakegg\/hugo://g'| sed 's/ AS builder//g')
96
-
docker run \
97
-
--rm --interactive \
98
-
--publish 8081:8081 \
99
-
-v $(pwd):/src \
100
-
klakegg/hugo:${HUGO_VERSION} \
101
-
server -p 8081 --bind 0.0.0.0
101
+
export HUGO_VERSION=$(grep "FROM docker.io/floryn90/hugo" Dockerfile | sed 's/FROM docker.io\/floryn90\/hugo://g'| sed 's/ AS builder//g')
102
+
docker run --rm --publish 8080:8080 -v $(pwd):/src docker.io/floryn90/hugo:${HUGO_VERSION} server -p 8080
102
103
```
103
104
104
-
Access the local documentation: <localhost:8081>
105
+
Use the following command to set the hugo environment
106
+
107
+
```bash
108
+
export HUGO_VERSION=$(grep "FROM docker.io/floryn90/hugo" Dockerfile | sed 's/FROM docker.io\/floryn90\/hugo://g'| sed 's/ AS builder//g')
109
+
docker run --rm --publish 8080:8080 -v $(pwd):/src docker.io/floryn90/hugo:${HUGO_VERSION} server --environment=<environment> -p 8080
110
+
```
105
111
106
112
107
113
## Linting of Markdown content
108
114
109
115
Markdown files are linted with <https://github.com/DavidAnson/markdownlint>.
110
116
Custom rules are in `.markdownlint.json`.
111
117
There's a GitHub Action `.github/workflows/markdownlint.yaml` for CI.
112
-
For local checks, you can either use Visual Studio Code with the corresponding extension (markdownlint), or the command line like this:
118
+
For local checks, you can either use Visual Studio Code with the corresponding extension, or the command line like this:
113
119
114
120
```shell script
115
121
npm install
@@ -119,8 +125,14 @@ npm run mdlint
119
125
Npm not installed? no problem
120
126
121
127
```bash
122
-
export HUGO_VERSION=$(grep "FROM klakegg/hugo" Dockerfile | sed 's/FROM klakegg\/hugo://g'| sed 's/ AS builder//g')
123
-
docker run --rm --interactive -v $(pwd):/src klakegg/hugo:${HUGO_VERSION}-ci /bin/bash -c "set -euo pipefail;npm install; npm run mdlint;"
128
+
export HUGO_VERSION=$(grep "FROM docker.io/floryn90/hugo" Dockerfile | sed 's/FROM docker.io\/floryn90\/hugo://g'| sed 's/ AS builder//g')
129
+
docker run --rm -v $(pwd):/src docker.io/floryn90/hugo:${HUGO_VERSION}-ci /bin/bash -c "npm install && npm run mdlint"
0 commit comments