![]() Usually, it starts a webserver and exposes the port to listen on. Sometimes instead of starting a bash shell, I start the Docker container and let it run its default CMD command. Just run exit or hit ctrl-D like you normally would. To exit out of the docker container bash shell. This makes it so the bash shell you’re launching behave more like a normal command shell. It’s easy to remove the Exited containers but the -rm will automatically clean house for you. Without this option, what ends up happening after playing with a few containers is that you’ll end up with a bunch of “Exited” containers that show up with docker ps -a. Once you exit from the container the docker container will automatically be removed. Let’s cover the options and their purposes: Option When I’m jumping into bash shell to explore, I find myself using these docker run options: -rm -ti. ![]() The command above starts a docker container and puts you into a bash command. Server version: Apache/2.4.6 (Amazon Linux 2)Ĭonf conf.d logs modules run $ docker run -rm -ti boltops/docker-tutorial bash ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |