Install docker, docker-compose for debin10

Purpose

--Installation - docker - docker-compose --Docker data Move the save destination directory

Install docker

sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt-get update
sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    gnupg2 \
    software-properties-common

curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -

sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/debian \
   $(lsb_release -cs) \
   stable"
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io

Install docker-compose

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

#Docker after installation-If the compose command fails, check the path
#Also in the path/usr/Create symbolic links to bins and other directories, etc.
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

no sudo

--Make it executable without sudo

sudo groupadd docker
sudo gpasswd -a $USER docker

docker data directory move

#Add to the end of the file. -Specify the docker data save destination directory after g
OPTIONS="-g /opt/docker"
#option file read
EnvironmentFile=/etc/default/docker

#At the end of the ExecStart line$Added OPTIONS
ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock $OPTIONS
sudo systemctl daemon-reload
sudo systemctl restart docker

Reference site

https://docs.docker.com/engine/install/ https://mebee.info/2020/04/13/post-8593/ https://www.codeflow.site/ja/article/how-to-install-and-use-docker-on-debian-10 https://qiita.com/DQNEO/items/da5df074c48b012152ee

Recommended Posts

Install docker, docker-compose for debin10
Docker, docker-compose for server-side Kotlin
Install docker and docker-compose on Alpine Linux
Install Docker Desktop for Mac with Homebrew
Install an older version of Docker for Mac
Install Docker on Manjaro
How to install Docker
Docker Compact Manual (3: docker-compose)
Install Composer with Docker
Install Docker on Raspberry Pi
Install Docker on Ubuntu Server 20.04
Beginners install docker for mac and prepare php7.0 operating environment
Install yarn in docker image
Install latest git for Debian10
(For beginners) [Rails] Install Devise
Install docker on AWS EC2
Introducing "" Monitoring Tool "" for monitoring Docker
People using docker Try using docker-compose
Rails 6 (API mode) + MySQL Docker environment creation by docker-compose (for Mac)
Install Docker and docker-compose on Raspberry Pi 4, Linux (Debian) and Windows 10, respectively
Install openjdk8 on Docker image (Debian)
Install Docker on AWS Ubunt 20.04 LTS
Install java with Ubuntu 16.04 based Docker
How to install JMeter for Mac
Docker on NILFS2 filesystem (for raspbianOS)
Articles referred to for incorporating Docker
[Folio LSP] Roughly Docker (for beginners)
Install laravel/Dusk in docker environment (laravel6)
Create Laravel environment with Docker (docker-compose)
Jupyter's Docker environment for running TensorFlow
Docker execution memo summarized for myself
[WIP] Use NFS for Docker Volume
[Docker] Unsupported config option for services.app:'node'
docker single container restart for myself
Challenge to install WSL2 and docker
Docker For Mac Slow: Countermeasure II
Docker related commands (notes for yourself)
Let's install Docker on Windows 10 and create a verification environment for CentOS 8!