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:
|
||||
|
||||
```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.
|
||||
|
|
|
@ -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 you’d 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
|
||||
|
|
Loading…
Reference in New Issue