docker-hub: use "console" for shell examples

This allows for easier copying of the commands, without selecting the
prompt.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2021-08-06 17:13:23 +02:00
parent a574227c8d
commit 8e8280a57e
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
2 changed files with 9 additions and 10 deletions

View File

@ -136,12 +136,11 @@ Docker Hub.
1. Start by creating a [Dockerfile](../engine/reference/builder/) to specify your application as shown below:
```shell
cat > Dockerfile <<EOF
FROM busybox
CMD echo "Hello world! This is my first Docker image."
EOF
```
```dockerfile
# syntax=docker/dockerfile:1
FROM busybox
CMD echo "Hello world! This is my first Docker image."
```
2. Run `docker build -t <your_username>/my-private-repo .` to build your Docker
image.

View File

@ -42,14 +42,14 @@ To scan an image for vulnerabilities, push the image to Docker Hub:
2. Use the command line to log into your Docker account. See [docker login](../engine/reference/commandline/login.md) for more information.
3. Tag the image that youd like to scan. For example, to tag a Redis image, run:
```shell
docker tag redis <your-Docker-ID>/<your-repo-name>:latest
```console
$ docker tag redis <your-Docker-ID>/<your-repo-name>:latest
```
4. Push the image to Docker Hub to trigger vulnerability scanning on the image:
```shell
docker push <your-Docker-ID>/<your-repo-name>:latest
```console
$ docker push <your-Docker-ID>/<your-repo-name>:latest
```
## View the vulnerability report