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
- bundler: failed to load command: rails (/ usr/local/bundle/bin/rails) on the web with docker-compose up
- linux - about the expr command and regular expressions
- 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
- docker - about the period specified in the build command
- about docker: ports
- docker - how to execute the command specified by entry point in kubernetes in the background
- basic - about command prompt telnet
- docker - about multi-stage build
- i am learning about java about addition of command line arguments
- algorithm - about the difference in average calculation amount between insert sort and quick sort
- mysql - about docker container startup error
- questions about development and deployment using docker
- linux - about the total of the ls -la command
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- python - you may need to restart the kernel to use updated packages error
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- python 3x - typeerror: 'method' object is not subscriptable
- xcode - pod install [!] no `podfile 'found in the project directory
- vuejs - [vuetify] unable to locate target [data-app] i want to unit test to avoid warning
- i want to call a child component method from a parent in vuejs