Giter Club home page Giter Club logo

Comments (9)

shankerwangmiao avatar shankerwangmiao commented on September 26, 2024

要想配合 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.

xx-zhang avatar xx-zhang commented on September 26, 2024

@shankerwangmiao 谢谢,完全理解了。

from tunasync-scripts.

xx-zhang avatar xx-zhang commented on September 26, 2024

@shankerwangmiao 兄弟您知道 npm, mavengem仓库的同步方法不; 就是不用 nexus3, 用您 scripts 里面的 node-sync.py, maven-sync.py 的这种脚本的方法,当然打包成docker使用类似的工具也行。给个思路即可。

from tunasync-scripts.

shankerwangmiao avatar shankerwangmiao commented on September 26, 2024

rubygems 请使用 Docker 镜像 tunathu/rubygems-mirror 配合 rubygems.sh,其余的我不清楚同步方式,我也不知道你提到的 node-sync.py 等是从何而来。

from tunasync-scripts.

xx-zhang avatar xx-zhang commented on September 26, 2024

@shankerwangmiao 好的,谢了;

from tunasync-scripts.

xx-zhang avatar xx-zhang commented on September 26, 2024

@shankerwangmiao 请问下,这个 git 的机制是什么样的,https://mirrors.tuna.tsinghua.edu.cn/git/gcc.git 仓库git到了本地,为什么可以使用 git clone 下来,是装了gitlab的服务,挂载了git用户下么。

from tunasync-scripts.

shankerwangmiao avatar shankerwangmiao commented on September 26, 2024

我没理解您的问题。

from tunasync-scripts.

xx-zhang avatar xx-zhang commented on September 26, 2024

我没理解您的问题。

就是怎么让远程存储的git项目支持 git clone .

from tunasync-scripts.

shankerwangmiao avatar shankerwangmiao commented on September 26, 2024

我没理解您的问题。

就是怎么让远程存储的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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.