I am a beginner studying docker.
While investigating, I found that there are two ways to start a container.
create ⇒ Start method and
It is a method to execute run suddenly.
I think run is a command that can execute "create ⇒ start" together.
I have a question,
When I tried to start mysql container, I found only a way to start from run.
In most cases, the "-d" option is used to run in the background when running with run.
Because I am a beginner of docker, I want to know what procedure it works at first, so I want to start mysql container with create ⇒ start instead of run, but I understand how to correspond to the "-d" run command did not.
create ⇒ Does it automatically run in the same background as the "-d" option when starting?
How to start httpd container can be found both in create ⇒ start even in run.
It doesn't fall into the trap that mysql can only be found if the search is bad.
Is it too basic and not much information?
I'm sorry, but thanks for your professor.
※ By the way, the goal is dokcer,
To create a development environment.
If i like, please let me know the recommended books and sites.
Answer # 1
docker startis not specified, it will be executed in the background in the same way as
docker run -d.
-aoption can be used to attach to PID = 1 process when container starts. I think this will be the same behavior as without
create->There are few examples of start because I think that the run command is sufficient, but I don't know the exact place.
In my case, when making my own container, I often refer to the Dockerfile of the container that is on Docker Hub.
For mysql, https://hub.docker.com/_/mysql.
- about docker images command
- linux - about the total of the ls -la command
- about the difference between scanf ("% d% d", ~~) and scanf ("% d% d", ~~) in c
- about sharing images on docker hub
- docker cp command doesn't work
- about updating the library in the docker container when developing python
- mysql - about the setting to connect to the db in docker from the sql client
- about docker inspcet nw
- about docker startup
- about docker: ports
- python - about the phenomenon that the brew command is not found in jupyterlab
- i want to execute the docker command from a python process
- html - about the difference in markup
- i ran the following command, but "docker-compose run bundle install"
- i want to write a command to restart ubuntu in docker in a dockerfile
- vba - about the setting of the command button of the user form
- php - using docker command in container results in bash: docker-compose: command not found
- about errors in docker-composeyml file
- linux - about the expr command and regular expressions
- docker - about the period specified in the build command