docker-made



Developers
New Developers


Developers
New Developers
Please set the development environment.
Tomcat, MySQL, Redis,
Node .... etc
You can spread it.


Developers
New Developers
Yep!
Finished!

Developers
New Developers
How do you spread this?
Here is the error message.
Can the version be xx?
I was able to distribute it well and I got an error.
Please set a new person too!
I did what you told me.
How do I debug?


Developers
New Developers
How do you spread this?
Here is the error message.
Can the version be xx?
I was able to distribute it well and it was an error ..
Please set a new person too!
I did what you said.
How do I debug?

How??

Docker


Docker-made

$ docker run [OPTIONS] IMAGE_NAME [COMMAND] [ARG...]
I am container!

$ docker run [OPTIONS] IMAGE_NAME[COMMAND][ARG...]

$ docker run [OPTIONS] IMAGE_NAME[COMMAND][ARG...]

$ docker run [OPTIONS] IMAGE_NAME[COMMAND][ARG...]

$ docker run [OPTIONS] IMAGE_NAME[COMMAND][ARG...]

$ docker run [OPTIONS] IMAGE_NAME[COMMAND][ARG...]
The Docker Compose
Multi-container
.

------------------------------ web container
------------- redis container
$ docker-compose up
- Development environments
- Automated testing environments
- Single host deployments
- using in docker swarm
ㅁ Typical use cases
- Development environments
- Automated testing environments
- Single host deployments
- using in docker swarm
ㅁ Typical use cases
Try applying docker-compose to existing project
1. UI Project ( Application Context : "/" ) - Spring MVC
2. API Project ( Application Context : "/api" ) - Spring MVC
3. Admin Project ( Application Context : "/admin" ) - Spring MVC
Client ( / )
Fire (/ api)
Admin (/ admin)
WAS ( Tomcat )
Database
( MySQL )
Client ( / )
Fire (/ api)
Admin (/ admin)
WAS ( Tomcat )

Database
( MySQL )

Step 1: Create a Dockerfile (MySQL)

Step 1: Create a Dockerfile (Tomcat)
Step 2: Create docker-compose.yml

Location of MySQL Dockerfile
Location of Tomcat Dockerfile
Step 3: Modify the web property file

Step 3: Modify the web property file


Step 1: Create a Dockerfile (MySQL)

MySQL
Step 1: Create a Dockerfile (MySQL), (Tomcat)

MySQL

Tomcat
Step 1: Create a Dockerfile (MySQL), (Tomcat)

MySQL

Tomcat
Step 2: Create docker-compose.yml
Step 1: Create a Dockerfile (MySQL), (Tomcat)

MySQL

Tomcat
Step 2: Create docker-compose.yml
Step 3: Modify the web property file
127.0.0.1:3306 !!!
??????
Step 1: Create a Dockerfile (MySQL), (Tomcat)

MySQL

Tomcat
Step 2: Create docker-compose.yml
Step 3: Modify the web property file
registration-database:3306 !!!
!!!!!!
4단계 : docker-compose up

End


Developers
New Developers


Developers
New Developers
$ docker-compose up
Please
testing
Step 5: Setting the debugging (Intellij)

Step 5: Setting the debugging (Intellij)

Vagrant 란?
Using Virtual Box ...

Using Virtual Box ...


Using Virtual Box ...
Using Virtual Box ...



Vagrant
Provisioning
etc...
Providers









Apply vagrant to existing project
Client ( / )
Fire (/ api)
Admin (/ admin)
WAS ( Tomcat )
Database
( MySQL )

Step 1: Create a Vagrantfile

Step 1: Create a Vagrantfile

Step 2: Create setup.sh and startup.sh


setup.sh
1. Install Java 8
2. Install Tomcat 8.0.x
3. Installing MySQL 5.6.x
startup.sh
1. Tomcat, MySQL run !
3단계 : vagrant up


End


Developers
New Developers


Developers
New Developers
$ vagrant up
Please
testing
Docker-compose vs Vagrant
If you want to be light,

If you want to be light,

docker-made
If you want to use Deploy in your development environment

If you want to use Deploy in your development environment

docker-made
If you want to use existing docker images

If you want to use existing docker images

docker-made
If you need direct access to the IP: port
Docker for Mac can not ping the container from the docker host.

If you need direct access to the IP: port

172.18.0.2
MySQL
If you need direct access to the IP: port

172.18.0.2:3306 !!!
MySQL
?????
If you need direct access to the IP: port

127.0.0.1:3306 !!!
MySQL
!!!!
If you need direct access to the IP: port
Docker for Mac can not ping the container from the docker host.

vagrant
If there are many file R / Ws

If there are many file R / Ws

vagrant
If you want to mix ...?
vagrant

Real Server

Deploy
Tomcat
MySQL
Tomcat
MySQL






If you want to mix ...?

But perhaps the most important thing ...

Comfort
Tech * People + a >= Time ?
Q & A
docker-compose
By Tarun Sharma
docker-compose
- 887