35+ stories, thoughts and ideas.35+ stories, thoughts and ideas.


stories, thoughts and ideas.

Ubuntu安装docker

sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt-get install -y  ca-certificates curl gnupg  lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io
sudo groupadd docker
sudo gpasswd -a ${USER} docker
sudo systemctl restart docker

退出重新登录,ubuntu用户即可使用docker命令。

例子:

  • speedtest-x测速应用。

    docker run -d -p 8888:80 -it --name speedtest -e SAME_IP_MULTI_LOGS=true stilleshan/speedtest-x 
  • whoogle

    docker run --publish 5000:5000 --detach --name whoogle \
    -e WHOOGLE_CONFIG_DISABLE=on \
    -e WHOOGLE_CONFIG_COUNTRY=HK \
    -e WHOOGLE_CONFIG_LANGUAGE=lang_zh-CN \
    -e WHOOGLE_CONFIG_NEW_TAB=on \
    -e WHOOGLE_CONFIG_URL=https://mygoogle.com/ \
     benbusby/whoogle-search:latest 
本原创文章未经允许不得转载 | 当前页面:35+ stories, thoughts and ideas. » Ubuntu安装docker

评论