8. Containers & images
• Docker Images
• Run =>
• The pull command fetches the alpine image from the Docker registry and
saves it in our system. In this case the registry is Docker Hub
• You can change the registry, but that’s a different lab
docker pull alpine
Alpine is a lightweight Linux distribution so it is quick to pull down and run, making it
a popular starting point for many other images
12. Containers & images
• Docker run
• RUN =>
• RUN =>
• RUN =>
• RUN =>
docker run alpine echo "hello from alpine"
docker run alpine /bin/sh
docker run -it alpine /bin/sh
Ctl + P + Q
15. Container isolation
• Docker exec
• RUN =>
• RUN =>
docker exec -it XXXXX /bin/sh
docker rm -f `docker ps -a -q`
16. Image registries and Docker Hub
• Docker commit
• RUN =>
• Docker push
• RUN =>
• RUN =>
• RUN =>
docker commit XXXXX orozcohsu/test
docker push orozcohsu/test
Enter your account and password of dockerhub
docker login
docker logout