1 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
2 sudo apt update
3 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
4 sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
5 sudo apt update
6 sudo apt install docker-ce
7 curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
8 sudo add-apt-repository "deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/ \
$(lsb_release -cs) \
stable"
9 sudo apt-get install docker-ce docker-ce-cli containerd.io -y
10 docker
11 docker -version
12 docker --version
13 sudo apt install docker-ce
14 for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done
15 # Add Docker's official GPG key:
16 sudo apt-get update
17 sudo apt-get install ca-certificates curl gnupg
18 sudo install -m 0755 -d /etc/apt/keyrings
19 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
20 sudo chmod a+r /etc/apt/keyrings/docker.gpg
21 # Add the repository to Apt sources:
22 echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
23 sudo apt-get update
24 sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
25 docker
26 sudo docker network create playedu-network
27 sudo docker run -d --restart=always --network playedu-network --name playedu-redis redis:7.0.12
28 sudo docker run -d --restart=always --name playedu-minio --network playedu-network -p 9002:9000 -p 50002:9001 -e MINIO_ROOT_USER="username" -e MINIO_ROOT_PASSWORD="password" -e MINIO_DEFAULT_BUCKETS=playedu:public bitnami/minio:latest
29 sudo docker run -d --restart=always --name playedu-mysql --network playedu-network -e MYSQL_ROOT_PASSWORD=playeduxyz -e MYSQL_DATABASE=playedu mysql:5.7
30 sudo docker run -d --restart=always --network playedu-network \
31 sudo docker run -d --restart=always --network playedu-network --name playedu-light -p 9700:80 -p 9800:9800 -p 9801:9801 -p 9900:9900 -e DB_HOST=playedu-mysql -e DB_PORT=3306 -e DB_NAME=playedu -e DB_USER=root -e DB_PASS=playeduxyz -e REDIS_HOST=playedu-redis -e REDIS_PORT=6379 -e REDIS_PASS= -e SA_TOKEN_JWT_SECRET_KEY=playeduxyz registry.cn-hangzhou.aliyuncs.com/playedu/light:1.4
32 ufw status
33 apt install ufw
34 sudo apt install ufw
35 ufw disable
36 sudo ufw disable
37 ufw status
38 sudo ufw disable
39 history
标签:network,--,sudo,apt,playedu,ubnutu20.04,docker,安装
From: https://www.cnblogs.com/xl4ng/p/17737412.html