[docker] Basic command

  1. Create the docker file
  • docker image ls
    -> should be able to see the image
  • Docker COMMIT command (easy way)
    → inside docker container, you download stuff and then you can commit the container as it is to be an image
    docker commit <containerID> 1junechung/newcustomimage
docker run --name container1 my_first_image(actual image name) If docker has permission issues (only root allowed and normal user is not allowed)sudo usermod -aG docker $(whoami)If this doesn't work as well -> 
It means no privilege for creating new sockets in docker
sudo chmod 666 /var/run/docker.sock

ECR basic commands

How to use ECR
1. Login to AWS ECR registry first (= same as docker login)
aws ecr get-login-password --region ap-southeast-1 | docker login --username AWS --password-stdin 925878512292.dkr.ecr.ap-southeast-1.amazonaws.com
NO need to fill in username or password — just the command itself

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store