Until docker-compose up on CentOS7

I checked it every time I did it several times, so I summarized it. I haven't done anything special.

https://docs.docker.com/install/linux/docker-ce/centos/

Delete old version

$ sudo yum -y update
$ sudo yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-engine

Docker Engine installation

Yum repository setup

$ sudo yum install -y yum-utils \
    device-mapper-persistent-data \
    lvm2
$ sudo yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo

Add docker yum repository with

$ sudo yum install docker-ce docker-ce-cli containerd.io

Confirm when completed

$ docker --version
Docker version 19.03.5, build 633a0ea

Service start and auto start settings

$ sudo systemctl start docker
$ sudo systemctl enable docker

Docker Compose installation

https://github.com/docker/compose/releases

If not, install curl

$ sudo yum install -y curl

Installation

$ sudo curl -L https://github.com/docker/compose/releases/download/1.25.4/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
$ sudo chmod +x /usr/local/bin/docker-compose

Verification

$ docker-compose --version
docker-compose version 1.25.4, build 8d51620a

Put yourself in the docker group. Now you can docker-compose without sudo. If you do this, log out and log in again.

$ sudo usermod -aG docker $USER

Create docker-compose.yml for confirmation.

$ vim docker-compose.yml
version: "3"
services:
  hello:
    image: hello-world:latest

docker-compose up!

$ docker-compose up
Creating network "vagrant_default" with the default driver
Pulling hello (hello-world:latest)...
latest: Pulling from library/hello-world
1b930d010525: Pull complete
Digest: sha256:9572f7cdcee8591948c2963463447a53466950b3fc15a247fcad1917ca215a2f
Status: Downloaded newer image for hello-world:latest
Creating vagrant_hello_1 ... done
Attaching to vagrant_hello_1
hello_1  |
hello_1  | Hello from Docker!
hello_1  | This message shows that your installation appears to be working correctly.
hello_1  |
hello_1  | To generate this message, Docker took the following steps:
hello_1  |  1. The Docker client contacted the Docker daemon.
hello_1  |  2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
hello_1  |     (amd64)
hello_1  |  3. The Docker daemon created a new container from that image which runs the
hello_1  |     executable that produces the output you are currently reading.
hello_1  |  4. The Docker daemon streamed that output to the Docker client, which sent it
hello_1  |     to your terminal.
hello_1  |
hello_1  | To try something more ambitious, you can run an Ubuntu container with:
hello_1  |  $ docker run -it ubuntu bash
hello_1  |
hello_1  | Share images, automate workflows, and more with a free Docker ID:
hello_1  |  https://hub.docker.com/
hello_1  |
hello_1  | For more examples and ideas, visit:
hello_1  |  https://docs.docker.com/get-started/
hello_1  |
vagrant_hello_1 exited with code 0

that's all.

Recommended Posts

Until docker-compose up on CentOS7
Setting up grub on CentOS 8
Set up Python environment on CentOS
Install Faiss on CentOS 7
Install numba on CentOS 7.2
Install Python3.4 on CentOS 6.6
Install mecab-python on CentOS
Install Python 2.7.3 on CentOS 5.4
Installation on CentOS8 VirtualBox
Install awscli on centos7
Install Chainer on CentOS 6.7
Torque setup on CentOS 6
PySpark: Set up PySpark on your Alibaba Cloud CentOS instance
Launch Django on a Docker container with docker-compose up
Set up Python 3.4 on Ubuntu
Implemented retina net on CentOS
Anaconda environment construction on CentOS7
Install ImageMagick-6.2.x series on CentOS7.7
Install Python 3.8 on CentOS 7 (SCL)
Apache installation fails on CentOS 8.2
Setting up a CentOS 7 server hosted on Alibaba Cloud ECS
Simple traffic monitor on CentOS
Install Chrome on CentOS 7 series
Set up Polyglot on Windows
Install Python 3.8 on CentOS 8 (AppStream)
Notes on installing Python on CentOS
The day Chainer runs on GPU CentOS edition (up to CPU)
Setting up OpenSSH on Arch Linux
Use host.docker.internal on linux (docker-compose required)
Steps to deploy EMLauncher on CentOS 8
Steps to install MySQL 8.0 on CentOS 8.1
raspberry pi 4 centos7 install on docker
Steps to install VirtualBox on CentOS
Install java (Oracle JDK14) on CentOS7
[Linux] I installed CentOS on VirtualBox
How to install PyPy on CentOS
Until PythonCGI runs on UbuntuServer18.04 + Apache2
docker / docker-compose versioned installation (up | down)
How to install TensorFlow on CentOS 7
Install pip on CentOS7. Also iPython.
Create a python environment on centos
Install VirtualBox on CentOS 7 on VirtualBox (mac + vagrant)
Install Python on CentOS using Pyenv
How to install Maven on CentOS
Run docker-compose on Amazon Linux2 on ARM64
Build a python3 environment on CentOS7
Study Note 9_Install Jenkins on CentOS7
Install Python on CentOS using pyenv
Until you install Apache and Tomcat on Linux (CentOS) and deploy Java apps