Skip to main content

docker

Logging In

  • Login to your droplet via SSH: ssh root@YOURIP (Normally, you shouldn't use the root user. So use carefully. Then if you installed a certificate locally, you should be logged in).
  • Login via Console in DO is easier than command line now. Just go into droplet and go into Console.

Setting Up DO Docker

Docker Commands

  • docker ps shows list of images or use docker ps -a for more info.
  • docker pull to get the image
  • docker run
  • docker images -a list docker images - but will show latest. But, latest won't show version you are using. for that use
  • docker inspect < image_id >
  • docker rm <container_id> removes container
  • docker exec < containerNAME > env : shows env variables for a container
  • docker stop <container_id>