docs: Dockerfile - Use ref links

This commit is contained in:
Brennan Kinney
2025-05-19 12:09:44 +12:00
committed by GitHub
parent af57ec4659
commit 9dc4ea338b
2 changed files with 17 additions and 7 deletions

View File

@ -19,19 +19,19 @@ docker run --rm -it -v /tmp:/data --workdir /data ghcr.io/testssl/testssl.sh:3.2
> [!NOTE] > [!NOTE]
> - The UID/GID ownership of the file will be created by the container user `testssl` (`1000:1000`), with permissions `644`. > - The UID/GID ownership of the file will be created by the container user `testssl` (`1000:1000`), with permissions `644`.
> - 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/). > - Your host directory must permit the `testssl` container user or group to write to that host volume. You could alternatively use [`docker cp`][docker-docs::cli::cp].
## Images ## Images
### Available at DockerHub and GHCR ### Available at DockerHub and GHCR
You can pull the image from either of these registries: You can pull the image from either of these registries:
- DockerHub: [`drwetter/testssl.sh`](https://hub.docker.com/r/drwetter/testssl.sh) - DockerHub: [`drwetter/testssl.sh`][image-registry::dockerhub]
- GHCR: [`ghcr.io/testssl/testssl.sh`](https://github.com/testssl/testssl.sh/pkgs/container/testssl.sh) - GHCR: [`ghcr.io/testssl/testssl.sh`][image-registry::ghcr]
Supported tags: Supported tags:
- `3.2` / `latest` - `3.2` / `latest`
- `3.0` is the old stable version ([soon to become EOL](https://github.com/testssl/testssl.sh/tree/3.0#status)) - `3.0` is the old stable version ([soon to become EOL][testssl::v3p0-eol])
### Building the `testssl.sh` container image ### Building the `testssl.sh` container image
@ -47,7 +47,9 @@ There are two base images supported:
- openSUSE Leap ([`Dockerfile`](./Dockerfile)), glibc-based + faster. - openSUSE Leap ([`Dockerfile`](./Dockerfile)), glibc-based + faster.
- Alpine ([`Dockerfile`](./Dockerfile.alpine)), musl-based + half the size. - Alpine ([`Dockerfile`](./Dockerfile.alpine)), musl-based + half the size.
The Alpine variant is made available if you need broader platform support, or an image about 30MB smaller at the expense of slightly slower performance. The Alpine variant is made available if you need broader platform support, or an image about 30MB smaller at the expense of [slightly slower performance][testssl::base-image-performance].
For contributors, if needing context on the [package selection has been documented][testssl::base-image-packages] for each base image.
#### Tip - Remote build context + `Dockerfile` #### Tip - Remote build context + `Dockerfile`
@ -58,7 +60,7 @@ docker build --tag localhost/testssl.sh:3.2 https://github.com/testssl/testssl.s
``` ```
> [!NOTE] > [!NOTE]
> This will produce a slightly larger image as [`.dockerignore` is not supported with remote build contexts](https://github.com/docker/buildx/issues/3169). > This will produce a slightly larger image as [`.dockerignore` is not supported with remote build contexts][build::dockerignore-remote-context].
--- ---
@ -70,3 +72,11 @@ docker build \
--file https://raw.githubusercontent.com/testssl/testssl.sh/3.2/Dockerfile.alpine \ --file https://raw.githubusercontent.com/testssl/testssl.sh/3.2/Dockerfile.alpine \
https://github.com/testssl/testssl.sh.git#3.2 https://github.com/testssl/testssl.sh.git#3.2
``` ```
[docker-docs::cli::cp]: https://docs.docker.com/reference/cli/docker/container/cp/
[image-registry::dockerhub]: https://hub.docker.com/r/drwetter/testssl.sh
[image-registry::ghcr]: https://github.com/testssl/testssl.sh/pkgs/container/testssl.sh
[testssl::v3p0-eol]: https://github.com/testssl/testssl.sh/tree/3.0#status
[testssl::base-image-performance]: https://github.com/testssl/testssl.sh/issues/2422#issuecomment-2841822406
[testssl::base-image-packages]: https://github.com/testssl/testssl.sh/issues/2422#issuecomment-2841822406
[build::dockerignore-remote-context]: https://github.com/docker/buildx/issues/3169