mirror of https://github.com/docker/docs.git
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:
parent
a574227c8d
commit
8e8280a57e
|
@ -136,12 +136,11 @@ Docker Hub.
|
||||||
|
|
||||||
1. Start by creating a [Dockerfile](../engine/reference/builder/) to specify your application as shown below:
|
1. Start by creating a [Dockerfile](../engine/reference/builder/) to specify your application as shown below:
|
||||||
|
|
||||||
```shell
|
```dockerfile
|
||||||
cat > Dockerfile <<EOF
|
# syntax=docker/dockerfile:1
|
||||||
FROM busybox
|
FROM busybox
|
||||||
CMD echo "Hello world! This is my first Docker image."
|
CMD echo "Hello world! This is my first Docker image."
|
||||||
EOF
|
```
|
||||||
```
|
|
||||||
|
|
||||||
2. Run `docker build -t <your_username>/my-private-repo .` to build your Docker
|
2. Run `docker build -t <your_username>/my-private-repo .` to build your Docker
|
||||||
image.
|
image.
|
||||||
|
|
|
@ -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.
|
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 you’d like to scan. For example, to tag a Redis image, run:
|
3. Tag the image that you’d like to scan. For example, to tag a Redis image, run:
|
||||||
|
|
||||||
```shell
|
```console
|
||||||
docker tag redis <your-Docker-ID>/<your-repo-name>:latest
|
$ docker tag redis <your-Docker-ID>/<your-repo-name>:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
4. Push the image to Docker Hub to trigger vulnerability scanning on the image:
|
4. Push the image to Docker Hub to trigger vulnerability scanning on the image:
|
||||||
|
|
||||||
```shell
|
```console
|
||||||
docker push <your-Docker-ID>/<your-repo-name>:latest
|
$ docker push <your-Docker-ID>/<your-repo-name>:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
## View the vulnerability report
|
## View the vulnerability report
|
||||||
|
|
Loading…
Reference in New Issue