Skip to content

Latest commit

 

History

History
41 lines (32 loc) · 1.12 KB

B在电脑部署运行-linux-docker.md

File metadata and controls

41 lines (32 loc) · 1.12 KB

以AWS Lightsail Ubuntu 为例 安装步骤如下

  1. 安装 Docker
sudo apt-get update
sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"
sudo apt-get install docker-ce docker-ce-cli containerd.io -y

回车

sudo systemctl start docker
sudo systemctl enable docker
  1. 安装Docker-compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.26.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/dc
sudo chmod +x /usr/local/bin/dc
  1. wget https://github.com/hello-world-1989/temp/raw/main/docker/docker-compose.yml

  2. sudo dc up -d

  3. sudo dc ps 应该能看到 Up 状态, 如果不能, sudo dc logs 查看日志发送到电报群

  4. 防火墙放开 80, 8081 端口, 禁用 IPV6

  5. http://公共IPV4地址:8081, 需要访问下确认能打开,才会显示在网站上