scratch

§ Building Stuff with Docker

created 2021-11-18 · last edited 2024-01-31
  • create Dockerfile, write docker build ..
  • File contains shell stuff to run in RUN lines. can have newlines with backslash ala shell script.
  • docker run to run something at an image SHA (ie, not in a running container). Useful to debug. protip: docker run /bin/bash to get a shell.
  • docker run -it to ssh into the container interactively.
  • docker exec to run something in a container.
  • to delete an image: docker image ls, docker rmi -f
  • docker prune all unused stuff: docker system prune -a
  • docker login to login
  • docker build -t siddudruid/coolname . to name a docker image.
  • docker push siddudruid/coolname to push to docker hub.
  • docker pull siddudruid/coolname to pull from docker hub.
❦
Newer ৪ Blog ৪ Older