Cheat Sheets - Docker by Tacuma Solomon

Again, a cheat sheet for frequently used commands that I use for Docker. Reposting this here in my blog.

Building a docker image:

docker build --tag={image_name} .

If you wanna launch your app real quick:

https://docs.docker.com/get-started/part2/

Copying files out of a Docker Container

docker cp <container-name>:/path/to/file/in/container

Copying files into a Docker Container

docker cp <file> <container-name>:/path/to/file/in/container

Logging into the docker shell:

docker exec -t -i {image_name} /bin/bash

docker run -it {image_name} bash

Listing Docker Images

docker images -a

Removing a docker image:

docker rmi -f {image_name}

Seeing and removing docker images:

https://www.digitalocean.com/community/tutorials/how-to-remove-docker-images-containers-and-volumes

bin/airflow.sh local up

Builds an instance of docker, and also makes an instance of postures locally, checking for tables, and creating them if there isn’t any.

Setting up docker

https://docs.docker.com/get-started/

Setting up your Dockerfile

https://docs.docker.com/engine/reference/builder/

Exploring Docker’s fucking file system

https://stackoverflow.com/questions/20813486/exploring-docker-containers-file-system

1_9hGvYE5jegHm1r_97gH-jQ.png