Skip to content

Commit fe2a90d

Browse files
committed
Documentation: Improve Docker guidelines
1 parent 4d3b9f9 commit fe2a90d

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

DOCKER.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1-
# Running mqttwarn with Docker
1+
# Running mqttwarn with Podman or Docker
22

3-
If you would rather use `mqttwarn` without installing Python and the
4-
required libraries, you can run it as a [Docker container](https://www.docker.com/).
5-
You need to install only the Docker executable.
3+
If you would rather use `mqttwarn` without installing Python and the required
4+
libraries, you can run the OCI image on [Podman] or [Docker].
65

7-
You can run the image as a service, i.e. in the background, or you can
8-
run it interactively, perhaps to help diagnose a problem.
6+
You can run mqttwarn as a service, i.e. in the background, or you can run it
7+
interactively, perhaps to help diagnose a problem.
98

109
Docker images are automatically published to:
1110

1211
- https://github.com/orgs/jpmens/packages/container/package/mqttwarn-standard
1312
- https://github.com/orgs/jpmens/packages/container/package/mqttwarn-full
14-
- ~~https://hub.docker.com/r/jpmens/mqttwarn~~ (not automatically updated)
1513

1614
## Choosing the Docker image
1715

@@ -162,17 +160,25 @@ docker run -it --rm --volume=$PWD:/etc/mqttwarn --link=mosquitto $IMAGE
162160

163161
If you are making any changes to the `mqttwarn` application or to the
164162
`Dockerfile`, you can build a local image from the files on your drive (not
165-
from the files on Github).
163+
from the files on GitHub).
166164

167165
Execute the following from the root of the project :
168166
```
169-
docker build -t mqttwarn-local .
167+
export DOCKER_BUILDKIT=1
168+
export COMPOSE_DOCKER_CLI_BUILD=1
169+
export BUILDKIT_PROGRESS=plain
170+
171+
docker build --tag=local/mqttwarn-standard --file=Dockerfile .
172+
```
173+
174+
```
175+
docker build --tag=local/mqttwarn-full --file=Dockerfile.full .
170176
```
171177
172178
You can then edit any files and rebuild the image as many times as you need.
173179
You don't need to commit any changes.
174180
175-
The name `mqttwarn-local` is not meaningful, other than making it obvious when
181+
The name `local/mqttwarn-standard` is not meaningful, other than making it obvious when
176182
you run it that you are using your own personal image. You can use any name you
177183
like, but avoid `mqttwarn` otherwise it's easily confused with the official
178184
images.
@@ -199,3 +205,7 @@ image including dependencies for all modules, we have you covered. Alongside
199205
the standard image, there is also `ghcr.io/jpmens/mqttwarn-full:latest`.
200206

201207
The `standard` image weighs in with about 130 MB, the `full` image has 230 MB.
208+
209+
210+
[Docker]: https://docker.com/
211+
[Podman]: https://podman.io/

0 commit comments

Comments
 (0)