Comments (9)
要想配合 Docker 使用 tunasync,请在配置文件中添加 [docker]
小节:
[docker]
enable = true
volumes = [
"/path/to/foo:/path/to/bar:opt"
]
其中 volumes
数组中的各个元素表示公共的需要挂载的 docker volume,内容与 docker run
的 --volume
选项一致。
然后在需要启用 Docker 的镜像配置中增加下列配置项:
[[ mirrors ]]
# Other configurations
docker_image = "some/image:tag"
docker_options = [ "--some-opt", "opt_opt" ]
docker_volumes = [ "/path/to/other_foo:/path/to/other_bar:opt" ]
其中,docker_image
是必选配置,表示同步该镜像需要的 Docker Image 的名字,如不指定,该镜像同步时不使用 Docker;docker_options
数组是可选的,指定了同步该镜像启动 Docker 的时候传递给 docker run
的额外选项;docker_volumes
数组是可选的,指定了同步该镜像启动 Docker 的时候需要挂载的额外 Volume。
在同步这样的镜像的时候,tunasync 会通过 Docker 在指定的 Images 环境下执行同步指令(command
选项),除了配置中指定的 Volume 之外,tunasync 还会自动将目标目录挂载进 Container 中,并将环境变量 TUNASYNC_WORKING_DIR
指向目标目录在 Container 内部挂载的路径。
from tunasync-scripts.
@shankerwangmiao 谢谢,完全理解了。
from tunasync-scripts.
@shankerwangmiao 兄弟您知道 npm
, maven
, gem
仓库的同步方法不; 就是不用 nexus3
, 用您 scripts 里面的 node-sync.py
, maven-sync.py
的这种脚本的方法,当然打包成docker使用类似的工具也行。给个思路即可。
from tunasync-scripts.
rubygems 请使用 Docker 镜像 tunathu/rubygems-mirror
配合 rubygems.sh
,其余的我不清楚同步方式,我也不知道你提到的 node-sync.py
等是从何而来。
from tunasync-scripts.
@shankerwangmiao 好的,谢了;
from tunasync-scripts.
@shankerwangmiao 请问下,这个 git 的机制是什么样的,https://mirrors.tuna.tsinghua.edu.cn/git/gcc.git 仓库git到了本地,为什么可以使用 git clone 下来,是装了gitlab的服务,挂载了git用户下么。
from tunasync-scripts.
我没理解您的问题。
from tunasync-scripts.
我没理解您的问题。
就是怎么让远程存储的git项目支持 git clone .
from tunasync-scripts.
我没理解您的问题。
就是怎么让远程存储的git项目支持 git clone .
请参考 https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols#_the_http_protocols
from tunasync-scripts.
Related Issues (20)
- [linuxbrew-bottles] Failed to download resource "[email protected]" HOT 1
- no using issue which can be delete by owner HOT 3
- 有没有好的方法用yum_sync将整个站点脱下来包含该版本所有rpm包 HOT 2
- Use createrepo_c to replace createrepo
- Large amount of read io while running nix-channels.py
- PVE 7.0 发布了,请求添加proxmox中bullseye版本的同步 HOT 1
- LLVM 同步没有支持 debian 11 (Bullseye)
- nix-channel GC: dangling narinfo files HOT 1
- add nvidia channel?增加 nvidia channel? HOT 1
- cloud/pytorch 缺少osx-arm64目录
- git.sh同步github上的一个项目后又做了什么? HOT 5
- 请问pub.sh中的命令是怎么安装的? HOT 1
- git-recursive脚本同步git仓库时,工作不正常 HOT 3
- How to set "TUNASYNC_WORKING_DIR" as a customize download folder HOT 1
- Request and RFC for add Lean4 mirrors
- github-release脚本未能获取到所有release
- Use create_repo and apt-mirror to sync nodesource instead of lftp HOT 2
- Anaconda: Installer sync failed HOT 1
- S3 sync missing files HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tunasync-scripts.