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 许可协议。转载请注明出处!
相关文章
个人数据保全计划:搭建私有音乐库
下载音乐防灰,工具链折腾值不值?搭建私有流媒体,客户端体验一般般。数据自主权在手,平台下架算什么?
2023-09-29 · 个人数据保全计划 · 约 1 分钟
个人数据保全计划:安装Jellyfin
选择镜像:nyanmisaka/jellyfin Jellyfin中国特供版+Docker镜像,含驱动,免折腾开箱即用:https://post.smzdm.com/p/a3gw6g47/ 使用 docker-compose 部署 cd /share/Container/docker-apps/jellyfin mkdir cache config docker命令 docker run -d -
2022-11-04 · 个人数据保全计划 · 约 1 分钟
个人数据保全计划:(1)NAS开箱
前言 从几年前第一个硬盘故障导致参赛的文件丢失之后,我就开始意识到数据安全的重要性,开始用各种云盘做备份,当时还不是百度云一家独大,我们也都没意识到网盘备份是极其不靠谱的行为,直到因为某些不可抗力因素,一夜之间所有网盘都宣布停服,这时才意识到,数据始终是掌握在自己手中才安全可控。 随着数据量增大,我又购入一个2T硬盘,但因为不懂 + 被无良奸商坑了,买到手发现是叠瓦盘,用了一年多就频繁卡顿和丢数据
2022-11-13 · 个人数据保全计划 · 约 1 分钟
个人数据保全计划:(4)基础环境配置
关闭swap 内存足够的话(8G以上),可以考虑关闭swap提高系统性能 查看开启了哪些swap cat /proc/swaps 输出 | Filename | Type | Size | Used | Priority | | ------------------------------------- | ----
2022-11-13 · 个人数据保全计划 · 约 1 分钟
讨论
共 0 条加载评论中…