Docker for DevOps

Docker for DevOps

·

1 min read

Docker installation

sudo apt-get update #update the system
sudo apt-get install docker.io #docker installation

The docker daemon will not be able to get permissions once installed, we need to give permissions to docker by adding the user to a group.

sudo -a -G usermod docker $USER 
sudo reboot
  1. Command to check the containers
docker ps

  1. Command to check the images

     docker images
    

  2. Command to pull an image

  3. Command to start the container

  4. Inspect the container's running processes and exposed ports using the docker inspect command.

  5. Use the docker logs command to view the container's log output.

  6. Use the docker stop and docker start commands to stop and start the container.

  7. Use the docker rm command to remove the container when you're done.