Interactive containers and exec: get inside, run commands, get out

📰 Dev.to · Javi Palacios

Learn to interact with Docker containers using exec, cp, and shells to run commands and manage files

intermediate Published 14 Jul 2026
Action Steps
  1. Run a container in detached mode using 'docker run -d'
  2. Use 'docker exec' to run a command inside a running container
  3. Open an interactive shell inside a container with 'docker exec -it'
  4. Copy files between the host and container using 'docker cp'
  5. Compare the differences between interactive and detached modes to choose the best approach for your use case
Who Needs to Know This

DevOps engineers and developers can benefit from this knowledge to efficiently manage and debug their Docker containers

Key Insight

💡 Use 'docker exec' and 'docker cp' to interact with running containers and manage files

Share This
🚀 Get inside your Docker containers with exec and cp! 🚀

Key Takeaways

Learn to interact with Docker containers using exec, cp, and shells to run commands and manage files

Full Article

Learn to open shells inside containers, run commands in live containers with docker exec, copy files with docker cp, and know when to use interactive vs. detached mode.
Read full article → ← Back to Reads

Related Videos

AWS, Azure, GCP: The One Thing Every Business Gets Wrong
AWS, Azure, GCP: The One Thing Every Business Gets Wrong
AI Daily
Containers on Amazon ECS with Mama J
Containers on Amazon ECS with Mama J
AWS Developers
How to Open QTR Files (QuickTime Movie)
How to Open QTR Files (QuickTime Movie)
File Extension Geeks
Improving DevOps Security and Efficiency at Cathay with AWS ProServe | Amazon Web Services
Improving DevOps Security and Efficiency at Cathay with AWS ProServe | Amazon Web Services
Amazon Web Services
Kubernetes Observability 101: Metrics, Logs, Dashboards, and Traces
Kubernetes Observability 101: Metrics, Logs, Dashboards, and Traces
Kubesimplify
Do Azure and AWS Have Too Much Power? The EU’s Answer: Maybe So. #cloud #aws #azure
Do Azure and AWS Have Too Much Power? The EU’s Answer: Maybe So. #cloud #aws #azure
Digital Transformation with Eric Kimberling