Tanzu – Docker Commands

Below is a list of commands to get you started on VMware Tanzu with Docker. These were extremely useful to me, and I hope that you find them useful too!

Verify that the Docker engine is installed.

# which docker

Verify that Docker is running.

# systemctl status docker

Start Docker.

# systemctl start docker

Verify the Docker client and server version.

# docker version

List the current available container images on the workstation.

# docker images

Pull the nextlevelsddc container image from the local image registry.

# docker pull

Use Docker to run the container image that you previously pulled using port 80

# docker run -d -p 8080:80

-d runs the container in the background, releasing the command prompt and print container ID.
-p maps an external port (8080) to the internal port (80) of the container.

List the running containers.

# docker ps

Stop the container.

# docker stop

Build a new container image from the Dockerfile.

# docker build -t /root/nextlevelsddc/

Disclaimer: “I am a member of the Tanzu Vanguard community. As an active member, I am passionate about Tanzu and its offerings and willingly share my knowledge and experience with the world. I am not a representative of VMware. My views are my own. If you’d like to learn more about Tanzu Vanguard, please visit https://tanzu.vmware.com/vanguard”