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 the image with `testssl.sh` options appended (default is `--help`). The container entrypoint is already set to `testsl.sh` as the command for convenience.
4
4
5
-
```
6
-
docker build .
5
+
```bash
6
+
docker run --rm -it ghcr.io/testssl/testssl.sh:3.2 --fs github.com
7
7
```
8
8
9
-
Catch is when you run without image tags you need to catch the ID when building
9
+
### Output files
10
10
11
-
```
12
-
[..]
13
-
---> 889fa2f99933
14
-
Successfully built 889fa2f99933
15
-
```
11
+
Keep in mind that any output file (_`--log`, `--html`, `--json`, etc._) will be created within the container.
16
12
17
-
More comfortable is
13
+
Use a volume bind mount to a local host directory to access the files outside of the container. Set a working directory for the container and any options output prefix can then use a relative path, like this example for `--htmfile`:
18
14
19
-
```
20
-
docker build -t mytestssl .
21
-
docker run --rm -t mytestssl example.com
15
+
```bash
16
+
# Writes the HTML output to the host path: /tmp/example.com_p443-<date>-<time>.html
- 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/).
25
23
26
-
```
27
-
docker run -t mytestssl --help
28
-
docker run --rm -t mytestssl -p --header example.com
29
-
```
24
+
### From DockerHub or GHCR
30
25
31
-
### From dockerhub or GHCR
26
+
You can pull the image from either of these registries:
Keep in mind that any output file (--log, --html, --json etc.) will be created within the container. If you wish to have this created in a local directory on your host you can mount a volume into the container and change the output prefix where the container user has write access to, e.g.:
which writes the HTML output to ``/tmp/example.com_p443-<date>-<time>.html.`` The uid/gid is the one from the docker user. Normally the file is 644. testssl.sh's docker container uses a non-root user (usually with user/groupid 1000:1000).
57
+
This will produce a slightly larger image however as `.dockerignore` is not supported with remote build contexts.
58
+
59
+
If you would like to build the Alpine image instead this way, just provide the alternative `Dockerfile` via `--file`:
0 commit comments