linktools container toolkit
Project description
Docker/Pod容器部署工具
开始使用
以基于debain的系统为例配置环境,其他系统请自行安装相应软件,包括Python3, Python3-pip, Git, Docker, Docker Compose
# Install Python3, Python3-pip, Git, Docker, Docker Compose
wget -qO- get.docker.com | bash
sudo apt-get update
sudo apt-get install -y python3 python3-pip git docker-compose-plugin
安装最新版linktools-cntr库
python3 -m pip install -U linktools linktools-cntr
也可以安装开发版linktools-cntr库
python3 -m pip install --ignore-installed \
"linktools@ git+https://github.com/linktools-toolkit/linktools.git@master" \
"linktools_cntr@ git+https://github.com/linktools-toolkit/linktools-cntr.git@master"
容器部署
Nas (主页、Nextcloud、...) 环境部署
👉 搭建文档
Xray Server (websocket + ssl + vless) 环境搭建
👉 搭建文档
Redroid (Redroid、Redroid-Builder) 环境搭建
👉 搭建文档
内置配置
第一次部署时,会要求填写对应容器的配置项,其中部分内置的配置项包括:
| 参数 | 类型 | 默认值 | 描述 |
|---|---|---|---|
| CONTAINER_TYPE | str | - | 可选项 1. docker: 使用root权限docker daemon 2. docker-rootless: 使用rootless模式docker daemon 3. podman: 使用podman |
| DOCKER_USER | str | 当前shell用户 | 部分容器rootless模式的容器以此用户权限运行 |
| DOCKER_HOST | str | /var/run/docker.sock | docker daemon进程的 url |
| DOCKER_APP_PATH | str | ~/.linktools/data/container/app | 容器数据持久化目录,强烈建议指定到固态硬盘中 |
| DOCKER_APP_DATA_PATH | str | ~/.linktools/data/container/app_data | 不会频繁读写的容器数据持久化目录,可以放在机械硬盘中 |
| DOCKER_USER_DATA_PATH | str | ~/.linktools/data/container/user_data | 重要用户数据目录,强烈推荐指定到nas专用硬盘中 |
| DOCKER_DOWNLOAD_PATH | str | ~/.linktools/data/container/download | 下载数据目录 |
| HOST | str | 当前局域网ip地址 |
常用命令
# 每个子命令都可以通过添加-h参数查看帮助
ct-cntr -h
#######################
# 代码仓库相关(支持git链接和本地路径)
#######################
# 添加仓库
ct-cntr repo add https://github.com/ice-black-tea/cntr-homelab
# 拉去仓库最新代码
ct-cntr repo update
# 删除仓库
ct-cntr repo remove
#######################
# 容器安装列表管理
#######################
# 添加容器
ct-cntr add omv gitlab portainer vscode
# 删除容器
ct-cntr remove omv
#######################
# 容器管理
#######################
# 启动容器
ct-cntr up
# 重启容器
ct-cntr restart
# 停止容器
ct-cntr down
#######################
# 配置管理
#######################
# 查看容器docker配置
ct-cntr config
# 查看相关变量配置
ct-cntr config list
# 修改变量
ct-cntr config set ROOT_DOMAIN=test.com ACME_DNS_API=dns_ali Ali_Key=xxx Ali_Secret=yyy
# 删除变量
ct-cntr config unset ROOT_DOMAIN ACME_DNS_API Ali_Key Ali_Secret
# 使用vim编辑配置文件
ct-cntr config edit --editor vim
# 重新加载配置
ct-cntr config reload
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
linktools_cntr-0.0.4.tar.gz
(41.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file linktools_cntr-0.0.4.tar.gz.
File metadata
- Download URL: linktools_cntr-0.0.4.tar.gz
- Upload date:
- Size: 41.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
341de1c8416207eac11ca4cf7a31254f9dc5ab7a94f372e3ebc64511000aeabc
|
|
| MD5 |
2c555921699ed08587600999b7c4bfaf
|
|
| BLAKE2b-256 |
0bf845f157ad6f984802ba7fca5454eaae97bf7c30b43e2e1c27b80144ce3ea7
|
File details
Details for the file linktools_cntr-0.0.4-py3-none-any.whl.
File metadata
- Download URL: linktools_cntr-0.0.4-py3-none-any.whl
- Upload date:
- Size: 46.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
422d0f301f270ec2bd663535b43250499542babfc88267d54826cb431ea473dc
|
|
| MD5 |
7f4b5dd0fce51ceeecd0880ad3a63aaf
|
|
| BLAKE2b-256 |
9becf6b00b598defb35e009f901022d2c19bd8a0eb1bc5166d004a5e8d59dc19
|