Install Docker and docker-compose on Raspberry Pi 4, Linux (Debian) and Windows 10, respectively

I will write about Docker and docker-compoes that I am studying recently. Actually, I wanted to create an operating environment using the same Dockerfile and yml and write it to the point where I realized the convenience, but I will do it next time.

First, install Docker and docker-compose on Raspberry Pi 4

Is it because Raspberry Pi is ARM? , The installation method is different from the Linux version.

environment

--Raspberry Pi 4 + Rasbian10

1. Preparation

1-1. Update the list of packages

$ sudo apt-get update

1-2. Git installation

$ sudo apt-get install git-all

1-3. Install curl

$ sudo apt-get install curl

2. Docker / docker-compose installation

2-1. Obtain and install Docker.

$ curl -sSL https://get.docker.com | sh
$ docker -v
Docker version 19.03.13, build 4484c46d9d

If version is displayed, installation is successful.

2-2. Install Docker compose

Run the environment docker-compose instal shell obtained from git

$ git clone https://github.com/docker/compose.git
$ cd compose
$ git checkout 1.27.4
$ sudo ./script/build/linux
$ cd dist
$ sudo cp docker-compose-Linux-armv7l /usr/local/bin/docker-compose
$ cd /usr/local/bin
$ sudo chown root:root docker-compose
$ sudo chmod 755 docker-compose
$ docker-compose -v
docker-compose version 1.27.4, build 40524192

If version is displayed, installation is successful.

Next, install Docker and docker-compose on PC Linux

environment

1. Preparation

This is the same as Raspberry Pi, so omitted

2. Docker / docker-compose installation

2-1. Obtain and install Docker.

$sudo apt-get -y remove docker docker-engine docker.io
$sudo apt-get -y update
$sudo apt-get -y install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg2 \
    software-properties-common
$sudo curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | sudo apt-key add -
$sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") \
   $(lsb_release -cs) \
   stable"
$sudo apt-get update
$sudo apt-get -y install docker-ce
$docker -v
Docker version 19.03.13, build 4484c46d9d

If version is displayed, installation is successful.

2-2. Install Docker compose

Run the environment docker-compose instal shell obtained from git

$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-compose --version
docker-compose version 1.27.4, build 40524192

If version is displayed, installation is successful.

Finally, Windows 10

I didn't do it manually, so it's almost a reference. ..

environment

1. Preparation

1-1. Set the Window version to 2004 or later.

See below. https://support.microsoft.com/ja-jp/help/4028685/windows-10-get-the-update

1-2. Install WSL2.

See below. https://docs.microsoft.com/ja-jp/windows/wsl/install-win10

2. Install Docker Desk Top (Docker for Windows, docker-compose environment)

2-.1 Docker Desk Top installation

See below. https://docs.docker.com/docker-for-windows/install/

Next time, I will write a place to prepare and execute Dockerfile and yml file.

Recommended Posts

Install Docker and docker-compose on Raspberry Pi 4, Linux (Debian) and Windows 10, respectively
Install Docker on Raspberry Pi 4 and Raspberry Pi OS 64bit
Install Docker on Raspberry Pi
Create Dockerfile, docker-compose.yml and run nodejs on windows10, Linux, Raspberry Pi
Install Docker on Windows 10 PRO
Install docker and docker-compose on ubuntu in the shortest process
Install openjdk8 on Docker image (Debian)
Install MariaDB on Raspberry Pi OS
Install Java 9 on windows 10 and CentOS 7
Install Cloud9 on Raspberry pi 4 and set up Rails development environment
Raspberry Pi Kubernetes and Docker downgraded story
Headless install of Ubuntu 20.10 on Raspberry Pi
I installed Docker on my Raspberry Pi 3
Install CentOS 7 on Raspberry pi 4 Model B
Launched Redmine with Docker on Raspberry Pi 3
Let's install Docker on Windows 10 and create a verification environment for CentOS 8!
Install Ubuntu Core 18 on Raspberry Pi 2 Model B
Radiko recording server on Raspberry Pi 4 (Docker unused)
I couldn't install docker with raspberry pi2 b +.
Send emails using Docker container on Raspberry Pi 3
Operate Docker Desktop for Windows on Linux (WSL)
Install Ubuntu 20.04 in virtual box on windows10 and build a development environment using docker
Install Corretto 8 on Windows
Easily build Redmine on Windows using WSL2 and Docker
Install Docker on Manjaro
M.S. docker on Windows
[Amateur remarks] CentOS 8 was installed on Raspberry Pi 4 8G, and Wordpress was built using Docker-Compose.
The key to running Docker on Raspberry Pi 4 (Ubuntu server 20.04)
Put Ubuntu 20.04.1 on Raspberry Pi 4
Run openvpn on Docker (windows)
Try Docker on Windows 10 Home
Install rbenv on Amazon Linux
Install docker on AWS EC2
Install docker, docker-compose for debin10
Minecraft server on Raspberry Pi 4
Install java 1.8.0 on Amazon linux2
When the docker image created on Raspberry pi is read by docker on windows, the error "exec format error" appears.
Until you put Ubuntu 20 on Windows 10 Home and WSL2 and run Docker
Steps to install samba on CentOS 8 and connect from Windows 10 Explorer
Install Docker on Ubuntu and set up remote connection using tls
Install Docker on AWS Ubunt 20.04 LTS
Error when npm install on Windows 7
Install JDK and JRE on Ubuntu 16.10
Install Java with zip on Windows
How to install ImageMagick on Windows 10
Use Docker Compose on Windows 10 Home
Try putting CentOS 8 on Raspberry Pi 3
Note Book: OpenBLAS Install On Windows10
Note: setting javaMail on Raspberry Pi
Install and configure jenv on macOS
Try Docker on Windows Home (September 2020)
Note Book: LAPACK Install On Windows 10
Using Docker on Windows10 Home WSL2
Note Book: VTK Install On Windows10
Challenge to install WSL2 and docker
Ruby on Rails ✕ Docker ✕ MySQL Introducing Docker and docker-compose to apps under development
Installing Docker Desktop on Windows 10 Home was easy and easy (as of December 2020)