曦远 (DealiAxy)一份私人的文字刊物

StarBlog
返回文章列表折页手记阅读全文
个人数据保全计划

Personal Data Preservation Plan: Installing Docker

Quick Start Install Container Station from App Center Then it's recommended to first create a Container folder yourself in File Station, so you can control which volume Docker data is saved on; I put it on the SSD. After installation, the first time you open it you'll be prompted to create a Container shared folder; just select the Container directory you created earlier. Then it's all back to the command line It comes with docker-compose by default

曦远 (DealiAxy)约 7 分钟
目录6 个章节

Quick Start

Install Container Station from App Center

Then it's recommended to first create a Container folder yourself in File Station, so you can control which volume Docker data is saved on; I put it on the SSD.

After installation, the first time you open it you'll be prompted to create a Container shared folder; just select the Container directory you created earlier.

Then it's all back to the command line

It comes with docker-compose by default, no extra installation needed.

Or visit GitHub to see what the latest version is https://github.com/docker/compose/releases

I'm not going to bother with that.

Configure Hub Mirror

First find out where Docker is installed

which docker

Output

/share/CACHEDEV1_DATA/.qpkg/container-station/bin/docker

Go to the config file directory

cd /share/CACHEDEV1_DATA/.qpkg/container-station/etc

Edit the config file; this docker.json is equivalent to /etc/docker/daemon.json on a regular Linux system

vim docker.json

Add at the bottom

"registry-mirrors": [
  "https://docker.mirrors.ustc.edu.cn"
]

Or your own Alibaba Cloud acceleration mirror works too

Then restart Docker

sudo /etc/init.d/container-station.sh restart

Install Portainer

A graphical interface, convenient for managing Docker

Deploy using docker-compose

Just create /share/Container/softwares/portainer/docker-oompose.yml

version: "3"
services:
  portainer:
    image: portainer/portainer-ce
    restart: unless-stopped
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ./portainer_data:/data
    ports:
      - 9100:9000

Then just start it with docker-compose up

Visit http://nas_ip:9100 to set the username and password, select local for the environment, and you're done

Issues Encountered

Error when installing an image

write /var/lib/docker/tmp/GetImageBlob4256196071: no space left on device

After checking, /var/lib/docker was not linked inside the shared directory /Container

Recreate the link

cd /var/lib
sudo mv docker docker2
sudo ln -s /share/CACHEDEV1_DATA/.qpkg/container-station/var/lib/docker docker

References

References

_EOF_

Personal Data Preservation Plan: Installing Docker

本文作者:
程序设计实验室
版权声明:
本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!

相关文章

讨论

共 0 条

良言一句三冬暖,恶语伤人六月寒。

加载评论中…