git clone https://github.com/snyk/docker-goof && cd docker-goof# If you forked the repo, clone your fork.
The Docker Goof repo has many Dockerfiles. You can build some, or all, of them out. We'll focus on one of the available 6 in the instructions, but feel free to play with them all.
First set an Environment Variable for your Docker ID.
# Set an environment variable for your Docker IDDockerId=<<your_docker_id>>
Now build the docker-goof Docker Image. Your Docker ID will be appended to the Image Tag.
# Build your images with docker build.docker build -t $DockerId/docker-goof Dockerfile .
The image is now in our local Docker cache. Run
docker images to list it out.
How we'll push the images to Docker Hub. You'll need to authenticate with Docker Hub first.
# Authenticate with Docker Hub if you haven't alreadydocker login
Once authenticated, push the docker-goof image to Docker Hub.
docker push $DockerId/docker-goof
Log into Docker Hub and navigate to your repositories to see the freshly-pushed image.
We're now ready to enable Image Vulnerability Scanning for the repository!