Docker Basic Commands - Tecnew

Home Ads

Docker Basic Commands

Docker Basic Commands

Share This

 

Docker Installation:

1.    Go to official website documentation community edition (CE)

2.    Before install the docker see pre requisites

Docker pull (searches locally if not found pull from the docker hub)

Docker run (Start the new container)

Docker start (Restart the stopped container)

Docker stop (Stop the running container)

Docker run -d -p6000:6971 (Port binding)

Docker ps (Shows the running containers)

Docker ps -a (Shows the all the containers it may running or stopped)

Docker images (Shows the list of images)

Troubleshooting:

Docker logs containerId    or    Docker logs containerName (To show the logs of the container)

Docker run -d -p6001:6379  --name radis-older radis:4.0  (Change container name as you want)

Enter inside the Docker:

Docker exec -it ContainerId /bin/bash (It enter into the container) check pwd, cd /, env, Exit to exit from the container

Docker exec -it ContainerName  (To enter the container)

No comments:

Post a Comment