Skip to content

mkyong.com

  • Spring Boot
  • Java Virtual Threads
  • Contact
  1. Home /
  2. docker tips

Tag: docker tips

d
docker May 23, 2020 2 min read by mkyong 0 comments

What is docker –rm option

On Docker, –rm option means automatically remove the container when it exits. $ docker run –rm <container_id> Done 🙂 Please read on to understand more about –rm. 1. Remove a container On Docker, the container is an instance of an image, and we can create multiple containers from an image. If the container is exited […]

Read more What is docker –rm option
d
docker May 21, 2020 3 min read by mkyong 0 comments

How to list containers in Docker?

In Docker, we can use docker ps to show all running containers, docker ps -a to show all running and stopped containers. Here are some of the commonly used examples: Terminal # common $ docker ps // show only running containers $ docker ps -a // show all containers (running and stopped or exited) # […]

Read more How to list containers in Docker?
d
docker May 5, 2020 1 min read by mkyong 6 comments

How to copy files from docker container to host?

In this article, we will show you how to use docker cp to copy files or folders from a docker container to the host (local file system) or the reversed. For example, here is a running container, id is d362659da5fc, later we will copy files from and to this container. Terminal $ docker ps CONTAINER […]

Read more How to copy files from docker container to host?
d
docker April 11, 2020 2 min read by mkyong 0 comments

How to access the Docker container’s shell?

This article shows you how to use docker exec -it <container ID or Name> <sh or bash> to access or get into the container’s shell. Terminal # docker exec -it <contaier ID or name> <command> $ docker exec -it a5df11a07a0e bash /opt/app # $ docker exec -it stoic_bhaskara sh /opt/app # The docker exec -it […]

Read more How to access the Docker container’s shell?

Java and Spring tutorials since 2008. Every example is a complete, runnable file, compiled and run on a real machine before it goes out.

About This Site

  • About
  • Editorial Policy
  • Contact
  • Code License
  • Privacy Policy
  • Terms of Use

© 2026 mkyong.com — Powered by WordPress

RSS