#yum install yum-utils \
device-mapper-persistent-data \
lvm2
# yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
# yum install docker-ce
Error: Package: docker-ce-18.03.1.ce-1.el7.centos.x86_64 (docker-ce-stable)
Requires: pigz
# yum install http://mirror.centos.org/centos/7/extras/x86_64/Packages/pigz-2.3.3-1.el7.centos.x86_64.rpm
# yum install docker-ce
# yum list docker-ce
# systemctl start docker
# docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
9bb5a5d4561a: Pull complete
Digest: sha256:f5233545e43561214ca4891fd1157e1c3c563316ed8e237750d59bde73361e77
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/engine/userguide/
# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
# docker version
Client:
Version: 18.03.1-ce
API version: 1.37
Go version: go1.9.5
Git commit: 9ee9f40
Built: Thu Apr 26 07:20:16 2018
OS/Arch: linux/amd64
Experimental: false
Orchestrator: swarm
Server:
Engine:
Version: 18.03.1-ce
API version: 1.37 (minimum version 1.12)
Go version: go1.9.5
Git commit: 9ee9f40
Built: Thu Apr 26 07:23:58 2018
OS/Arch: linux/amd64
Experimental: false
# docker pull container-registry.oracle.com/database/enterprise:12.2.0.1
Error response from daemon: Get https://container-registry.oracle.com/v2/database/enterprise/manifests/12.2.0.1: unauthorized: authentication required
# docker login container-registry.oracle.com
Username: OTN_username
Password:
# docker pull container-registry.oracle.com/database/enterprise:12.2.0.1
# docker run -d -it --name OracleDB -p 32711:1521 container-registry.oracle.com/database/enterprise:12.2.0.1
# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9a13cf004144 container-registry.oracle.com/database/enterprise:12.2.0.1 "/bin/sh -c '/bin/ba…" 19 seconds ago Up 13 seconds (health: starting) 5500/tcp, 0.0.0.0:32711->1521/tcp OracleDB
# docker port OracleDB
1521/tcp -> 0.0.0.0:32711
# docker exec -it OracleDB bash -c "source /home/oracle/.bashrc; sqlplus /nolog"
SQL*Plus: Release 12.2.0.1.0 Production on Wed May 30 13:38:16 2018
Copyright (c) 1982, 2016, Oracle. All rights reserved.
SQL> conn / as sysdba
Connected.