树莓派4B安装64位系统并安装docker

#下载树莓派镜像
2021-05-07-raspios-buster-arm64.img
#进行安装

#执行安装docker
wget https://download.docker.com/linux/debian/dists/buster/pool/stable/arm64/containerd.io_1.2.6-3_arm64.deb
wget https://download.docker.com/linux/debian/dists/buster/pool/stable/arm64/docker-ce-cli_19.03.23-0debian-buster_arm64.deb
wget https://download.docker.com/linux/debian/dists/buster/pool/stable/arm64/docker-ce_19.03.23-0debian-buster_arm64.deb
dpkg -i containerd.io_1.2.6-3_arm64.deb
dpkg -i docker-ce-cli_19.03.23-0debian-buster_arm64.deb
dpkg -i docker-ce_19.03.23-0debian-buster_arm64.deb

sudo touch /etc/docker/daemon.json
sudo nano /etc/docker/daemon.json

{
“registry-mirrors”:[“https://registry.docker-cn.com”]
}

#Docker中国区官方镜像
https://registry.docker-cn.com

#网易
http://hub-mirror.c.163.com

#ustc
https://docker.mirrors.ustc.edu.cn

#中国科技大学
https://docker.mirrors.ustc.edu.cn

#阿里云容器 服务
https://cr.console.aliyun.com/

更改镜像后重启docker
systemctl restart docker
查看docker是否运行成功
ps -ef |grep dockerSSS

docker run --restart=always --name nginx01
–net mynetwork --ip 172.18.0.2 --privileged=true
-p 80:80 -p 443:443
-v /kdata/nginx/conf/nginx.conf:/etc/nginx/nginx.conf
-v /kdata/nginx/conf.d:/etc/nginx/conf.d
-v /kdata/nginx/logs:/var/log/nginx
-v /kdata/nginx/cert:/etc/nginx/cert
-v /kdata/nginx/www:/usr/share/nginx/html
-d nginx:1.20.1

docker run --restart=always --name es01
-p 9200:9200 -p 9300:9300
–net mynetwork --ip 172.18.0.3 --privileged=true
-e ES_JAVA_OPTS="-Xms512m -Xmx512m"
-v /kdata/es01/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
-v /kdata/es01/data:/usr/share/elasticsearch/data
-v /kdata/es01/plugins:/usr/share/elasticsearch/plugins
-v /kdata/es01/logs:/usr/share/elasticsearch/logs
-d elasticsearch:7.14.2

docker run --restart=always --name es02
-p 9201:9201 -p 9301:9301
–net mynetwork --ip 172.18.0.4 --privileged=true
-e ES_JAVA_OPTS="-Xms512m -Xmx512m"
-v /kdata/es02/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
-v /kdata/es02/data:/usr/share/elasticsearch/data
-v /kdata/es02/plugins:/usr/share/elasticsearch/plugins
-v /kdata/es02/logs:/usr/share/elasticsearch/logs
-d elasticsearch:7.14.2

你可能感兴趣的:(docker,容器,运维)