I changed my job to an in-house developed company from inexperienced, and now it is my second day of work. Since the local environment construction has been completed earlier, I will write the output. I would appreciate it if you could point out any incorrect statements.
Referenced site https://qiita.com/tsuboyataiki/items/90dbe94553d3dea39b19 https://knowledge.sakura.ad.jp/13265/ https://qiita.com/wasanx25/items/d47caf37b79e855af95f
Docker is a technology that is attracting attention in the infrastructure and DevOps area (a phrase that combines the development team and the operation team), and is a platform developed by Docker for creating, distributing, and executing container-type virtual environments. is.
It uses Linux container technology, and by using the kernel of the host machine to isolate processes and users, it can be made to look as if another machine is running.
-Lightweight and can be started and stopped at high speed. -By sharing the coded file, anyone can create the same environment anywhere. -By passing the created Docker image to other people, it will lead to prevention of version shift of each environment and shortening of development environment preparation.
In the Docker project directory
Terminal
$ docker-compose ps
Do the above. This will display the name and status of the container.
After confirming that the container exists, it is finally started.
Terminal
$ docker-compose up -d
Builds, (re) creates, launches, and attaches service containers. With the "-d" option, the container will start in the background and continue to run.
Depending on the person, it may take a long time here, so be patient. On the command line if the startup is successful
Terminal
Use Ctrl-C to stop
It will be displayed.
View the service log. (You can also specify the service name as an argument.)
Terminal
$ docker-compose logs
Stop the container and delete the container and network by referring to the service described in docker-compose.yml.
Terminal
$ docker-compose down
Terminal
$ docker-compose restart
I've just started touching it today and I still can't catch up with it at all, so I'll deepen my understanding one by one. I will update this article as I learn more and more.
Recommended Posts