Skip to content

Commit 324ec44

Browse files
committed
docs: Revise Dockerfile.md
- Use GH alerts for displaying notes - Relative links to `Dockerfile`s - `Dockerfile-alpine` => `Dockerfile.alpine`
1 parent 46896fb commit 324ec44

1 file changed

Lines changed: 19 additions & 13 deletions

File tree

Dockerfile.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@ Use a volume bind mount to a local host directory to access the files outside of
1717
docker run --rm -it -v /tmp:/data --workdir /data ghcr.io/testssl/testssl.sh:3.2 --htmlfile ./ example.com
1818
```
1919

20-
**NOTE:**
21-
- The UID/GID ownership of the file will be created by the container user `testssl` (`1000:1000`), with permissions `644`.
22-
- Your host directory must permit the `testssl` container user or group to write to that host volume. You could alternatively use [`docker cp`](https://docs.docker.com/reference/cli/docker/container/cp/).
20+
> [!NOTE]
21+
> - The UID/GID ownership of the file will be created by the container user `testssl` (`1000:1000`), with permissions `644`.
22+
> - Your host directory must permit the `testssl` container user or group to write to that host volume. You could alternatively use [`docker cp`](https://docs.docker.com/reference/cli/docker/container/cp/).
2323
24-
### From DockerHub or GHCR
24+
## Images
25+
26+
### Available at DockerHub and GHCR
2527

2628
You can pull the image from either of these registries:
2729
- DockerHub: [`drwetter/testssl.sh`](https://hub.docker.com/r/drwetter/testssl.sh)
@@ -31,7 +33,7 @@ Supported tags:
3133
- `3.2` / `latest`
3234
- `3.0` is the old stable version ([soon to become EOL](https://github.com/testssl/testssl.sh/tree/3.0#status))
3335

34-
### Building
36+
### Building the `testssl.sh` container image
3537

3638
You can build with a standard `git clone` + `docker build`. Tagging the image will make it easier to reference.
3739

@@ -41,26 +43,30 @@ git clone --branch 3.2 --depth 1 https://github.com/testssl/testssl.sh .
4143
docker build --tag localhost/testssl.sh:3.2 .
4244
```
4345

44-
There are two base images available:
45-
- `Dockerfile` (openSUSE Leap), glibc-based + faster.
46-
- `Dockerfile-alpine` (Alpine), musl-based + half the size.
46+
There are two base images supported:
47+
- openSUSE Leap ([`Dockerfile`](./Dockerfile)), glibc-based + faster.
48+
- Alpine ([`Dockerfile`](./Dockerfile.alpine)), musl-based + half the size.
49+
50+
The Alpine variant is made available if you need broarder platform support, or an image about 30MB smaller at the expense of slightly slower performance.
4751

48-
Alpine is made available if you need broarder platform support or an image about 30MB smaller at the expense of speed.
52+
#### Tip - Remote build context + `Dockerfile`
4953

50-
#### Remote build context + `Dockerfile`
5154
You can build with a single command instead via:
5255

5356
```bash
5457
docker build --tag localhost/testssl.sh:3.2 https://github.com/testssl/testssl.sh.git#3.2
5558
```
5659

57-
This will produce a slightly larger image however as `.dockerignore` is not supported with remote build contexts.
60+
> [!NOTE]
61+
> This will produce a slightly larger image as [`.dockerignore` is not supported with remote build contexts](https://github.com/docker/buildx/issues/3169).
62+
63+
---
5864

59-
If you would like to build the Alpine image instead this way, just provide the alternative `Dockerfile` via `--file`:
65+
To build the Alpine image instead, additionally provide the ([alternative `Dockerfile`](./Dockerfile.alpine)) via the `--file` option:
6066

6167
```bash
6268
docker build \
6369
--tag localhost/testssl.sh:3.2-alpine \
64-
--file https://raw.githubusercontent.com/testssl/testssl.sh/3.2/Dockerfile-alpine \
70+
--file https://raw.githubusercontent.com/testssl/testssl.sh/3.2/Dockerfile.alpine \
6571
https://github.com/testssl/testssl.sh.git#3.2
6672
```

0 commit comments

Comments
 (0)