sjtug / mirror-docker

Dockerfile for SJTUG mirror
https://mirrors.sjtug.sjtu.edu.cn
GNU Affero General Public License v3.0
31 stars 6 forks source link

avoid installing or using git in container #8

Closed lv-zheng closed 8 years ago

lv-zheng commented 8 years ago

Please review the commits. Issue #4 can be closed if merged.

Endle commented 8 years ago

感觉可以squash成一个commit再发PR 毕竟这些改动都是耦合的

lv-zheng commented 8 years ago

@Endle I did intend to separate these three commits... The fourth commit is made after I opened the PR, thus unable to squash :-(

Endle commented 8 years ago

I did intend to separate these three commits... The fourth commit is made after I opened the PR, thus unable to squash :-(

我觉得你可以把这四个commit都squash成一个 我没记错的话,你是可以覆盖 lv-zheng:topic_issue_4

lv-zheng commented 8 years ago

Squashed

Endle commented 8 years ago

Cool 看了一下,感觉没必要创建两个bash文件。完全可以合并到一起 话说我又有个idea:如果我们用Makefile来写怎么样?(骆神怎么看)

lv-zheng commented 8 years ago

small fix needed: unset PACKAGEURL at the head of set_pack_url().

Endle commented 8 years ago

突然想到了这个bash脚本的问题:如果当前目录已经有了这个文件,那应该如何处理?用wget下载下来后,应该如何校验? 所以,是不是换成git checkout?

lv-zheng commented 8 years ago

@Endle I have foreseen the dirty workaround to exclude .git directory.

Endle commented 8 years ago

@lv-zheng 如果这样,那用 git submodule怎么样?

lv-zheng commented 8 years ago

tunasync and mirror-web aren't subproject of mirror-docker. If submodules are used, we have to 钦定 an active developer to keep up with submodule upstream all the time, making commits that only update submodules, which is anti version control. Moreover, submodule make it hard for docker users to switch among different versions of tunasync/web and to debug.

Endle commented 8 years ago

为什么不钦定呢?我们又不是要跟上游保持同步 如果tunasync发了新版本,我们肯定要测试后才能用于rebiild image。既然这样,手动update submodule有什么问题呢?

lv-zheng commented 8 years ago

OK. Shall we preserve the git archive and ADD .tar.gz approach or use another method?

lv-zheng commented 8 years ago

不对啊,如果/sjtug/tunasync发了新版本,那一定是测试好的呀

Endle commented 8 years ago

Seems to be fixed.

如果还有问题,那就重开一个 issue 吧