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
目录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
- Three methods to change Docker's default storage location: https://blog.csdn.net/BigData_Mining/article/details/104921479
References
- Installing Docker (Container Station) on QNAP NAS - https://zhuanlan.zhihu.com/p/468539826
- How to reproduce and view docker run parameter commands - http://www.linuxea.com/2270.html
- Using Docker elegantly on QNAP - https://haoyu.love/blog1219.html
- https://www.chenyupeng.com/archives/为威联通nas设置dockerhub加速源
_EOF_
Personal Data Preservation Plan: Installing Docker
- 本文作者:
- 程序设计实验室
- 版权声明:
- 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
相关文章
PVE折腾笔记 (2) 挂载之前在QNAP里使用的硬盘
QNAP硬盘数据迁移真够折腾的,RAID、DRBD、LVM层层嵌套,读出来比解方程还难。mdadm能识别但挂载失败,还得激活LVM才能看到文件,这坑比啥玩意儿。直接重做系统最省事,留原方案也行但风险不小,QTS的鸡贼设计简直让人想砸机器。
2025-06-15 · 个人数据保全计划 · 约 1 分钟
个人数据保全计划:安装本地DNS
SmartDNS SmartDNS 是一个运行在本地的 DNS 服务器,它接受来自本地客户端的 DNS 查询请求,然后从多个上游 DNS 服务器获取 DNS 查询结果,并将访问速度最快的结果返回给客户端,以此提高网络访问速度。 SmartDNS 同时支持指定特定域名 IP 地址,并高性匹配,可达到过滤广告的效果。 与 DNSmasq 的 all-servers 不同,SmartDNS 返回的是访问
2022-11-12 · 个人数据保全计划 · 约 1 分钟
为什么我给虚拟机分了 32G 硬盘,Ubuntu 却只识别 16G?
32G硬盘在PVE里明明分配好了,到Ubuntu就变15G,LVM这鬼东西把空间藏哪儿去了?根目录就分了一半?这算哪门子逻辑,简直离谱。扩容三步走倒是简单,但谁特喵会用到这种坑爹设计。
2025-10-10 · 个人数据保全计划 · 约 1 分钟
PVE折腾笔记 (1) 告别卡顿的QTS,在威联通TS464c上安装PVE系统
QNAP 的 QTS 系统真是垃圾中的垃圾,臃肿不堪还拖慢速度。换个 PVE 系统立马飞起,纯净高效,性能和自由度直接拉满。折腾安装过程虽然繁琐,但结果绝对物超所值,NAS 升级服务器只需一步。
2025-06-15 · 个人数据保全计划 · 约 1 分钟
讨论
共 0 条加载评论中…