My studied Evidence
■upload images created locally into Docker HUB's repository
$ docker push xxxxxx/sample:latest
The push refers to repository [docker.io/xxxxxx/sample]
xxxxxx: Pushed
latest: digest: sha256:///
then,confirmed it from DockerHUB site.
■What is "Docker compose"?
command thaw will manage several container easily,Just like port setting,volume mount setting,and NW setting between containers.
(1)Installation Docker compose
$ sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 617 0 617 0 0 3427 0 --:--:-- --:--:-- --:--:-- 3427
100 15.4M 100 15.4M 0 0 23.3M 0 --:--:-- --:--:-- --:--:-- 23.3M
(2)added privilege
$ sudo chmod +x /usr/local/bin/docker-compose
(3)confirmed
$ docker-compose version
docker-compose version 1.24.1, build 4667896b
docker-py version: 3.7.3
CPython version: 3.6.8
OpenSSL version: OpenSSL 1.1.0j 20 Nov 2018
★below link is helpful to Reverse resolution
https://qiita.com/souichirou/items/6e701f6469822a641bdd
■TRY TO USE by creating wordpress environment via docker compose.
$ touch docker-compose.yml
$ chmod +x docker-compose.yml
$ cat docker-compose.yml
version: '3'
services:
wordpress:
image:wordpress
ports:
- 80:80
environment:
WORDPRESS_DB_HOST: mysql:3306
WORDPRESS_DB_USER: wp_user
WORDPRESS_DB_PASSWORD: wp_pass
depends_on:
- mysql
mysql:
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: sample
MYSQL_DATABASE: wordpress
MYSQL_USER: wp_user
MYSQL_PASSWORD: wp_pass