Skip to content
skillbld
Docker · 12-day planAll days
Day 4 of 12 30 min

Get a shell inside containers with exec and -it, explore their isolated file system and processes, install tools temporarily, pass settings with environment variables, copy files in and out, and pull details out with inspect.

By the end of today you can

  • Run commands in a running container with docker exec
  • Open an interactive shell with -it, and know when to use sh instead of bash
  • See that a container has its own files, processes and hostname
  • Pass settings into a container with -e
  • Copy files with docker cp and read details with docker inspect

What's inside

  • 6 sections
  • 2 diagrams and mind maps
  • 8 code examples you can run
  • 5-question quiz
  1. 1Running a command inside
  2. 2An interactive shell
  3. 3Containers are disposable
  4. 4Passing settings: environment variables
  5. 5Copying files
  6. 6Inspecting

Sign in free to read this lesson

Get the full lesson with diagrams, runnable code and the quiz. Your progress is saved across devices.

Sign in free

Keep going

Day 4: Inside a Container · Docker · SkillBld