docker opencart

[root@nckmvdsla19211 nginx]#  docker pull opencart
Using default tag: latest
Trying to pull repository registry.access.redhat.com/opencart ...
Trying to pull repository docker.io/library/opencart ...
latest: Pulling from docker.io/library/opencart
f2aa67a397c4: Already exists
4c3122805fd6: Already exists
98ce407ee18a: Already exists
8a56b8f1ca72: Already exists
3eb04e3939f2: Already exists
f5ecc66c0a5f: Already exists
30ebdb4a78e1: Already exists
9e9c0e2ba7f1: Already exists
da976026223e: Already exists
c97e6cef8eb4: Already exists
d7d37db38fe6: Already exists
4fbe9ea008c2: Already exists
b5247a62a2b6: Already exists
a430e65efb58: Already exists
9afdee095b5b: Already exists
12d5f9a19746: Pull complete
f785e67a07ef: Pull complete
5663bbfd9606: Pull complete
ff13a5b7e05e: Pull complete
710c4b456373: Pull complete
Digest: sha256:b0460dba11737144b232a7794403d4052982f2332caeea82f618fc98d0547387
Status: Downloaded newer image for docker.io/opencart:latest
[root@nckmvdsla19211 nginx]# docker exec -ti opencart
"docker exec" requires at least 2 argument(s).
See 'docker exec --help'.

Usage:  docker exec [OPTIONS] CONTAINER COMMAND [ARG...]

Run a command in a running container
[root@nckmvdsla19211 nginx]# docker start opencart
Error response from daemon: No such container: opencart
Error: failed to start containers: opencart
[root@nckmvdsla19211 nginx]# mkdiropencart
[root@nckmvdsla19211 nginx]# vidocker-compose.yml
[root@nckmvdsla19211 nginx]# cd ..
[root@nckmvdsla19211 ~]# ls
anaconda-ks.cfg  Desktopnginxphpmyadminrelease.asc
^C               hello-world  original-ks.cfg                        Python-3.6.4         thinclient_drives
composer.phar    ks-post.log  packstack-answers-20180601-013059.txt  Python-3.6.4.tar.xz  wwi.bak
[root@nckmvdsla19211 ~]# mkdiropencart
[root@nckmvdsla19211 ~]# vidocker-compose.yml

version: '2'

services:
db:
     image: mysql:5.7
     volumes:
       - db_data:/var/lib/mysql
     restart: always
     environment:
       MYSQL_ROOT_PASSWORD: someopencart
       MYSQL_DATABASE: opencart
       MYSQL_USER: opencart
       MYSQL_PASSWORD: opencart

opencart:
depends_on:
       - db
     image: opencart:latest
     ports:
       - "8000:80"
     restart: always
     environment:
OPENCART_DB_HOST: db:3306
OPENCART_DB_USER: opencart
OPENCART_DB_PASSWORD: opencart
volumes:
db_data:

[root@nckmvdsla19211 ~]# docker-compose up -d
Creating network "root_default" with the default driver
Creating volume "root_db_data" with default driver
Pulling db (mysql:5.7)...
Trying to pull repository registry.access.redhat.com/mysql ...
Trying to pull repository docker.io/library/mysql ...
5.7: Pulling from docker.io/library/mysql
f2aa67a397c4: Already exists
1accf44cb7e0: Already exists
2d830ea9fa68: Already exists
740584693b89: Already exists
4d620357ec48: Already exists
ac3b7158d73d: Already exists
a48d784ee503: Already exists
bf1194add2f3: Pull complete
0e5c74178a02: Pull complete
e9201d309436: Pull complete
bf1ac4524e8e: Pull complete
Digest: sha256:f030e84582d939d313fe2ef469b5c65ffd0f7dff3b4b98e6ec9ae2dccd83dcdf
Status: Downloaded newer image for docker.io/mysql:5.7
Creating root_db_1 ... done
Creating root_opencart_1 ... done
[root@nckmvdsla19211 ~

Comments