Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker build 遇到的问题 #7

Closed
wjy1100 opened this issue Nov 21, 2017 · 12 comments
Closed

docker build 遇到的问题 #7

wjy1100 opened this issue Nov 21, 2017 · 12 comments
Labels

Comments

@wjy1100
Copy link

wjy1100 commented Nov 21, 2017

#Set mysql user && Load configured cacti sql by Leniy, to prevent manually configuration at first visit
mv: cannot move '/tmp/scripts/configured_cacti.sql' to '/var/cactibackups/cacti_backups.sql': No such file or directory
请指教

@leniy
Copy link
Owner

leniy commented Nov 21, 2017

执行COPY / /tmp的时候,把整个项目文件夹复制过去了么?

@wjy1100
Copy link
Author

wjy1100 commented Nov 21, 2017

不太清楚,我是直接进入文件夹 执行docker build -t cacti . 的

@wjy1100
Copy link
Author

wjy1100 commented Nov 21, 2017

Step 4 : COPY / /tmp/
---> 473929a850e4
Removing intermediate container c7c5a25c7602 应该是复制过去了

@leniy
Copy link
Owner

leniy commented Nov 21, 2017

稍等,我建个环境测试一下。

@leniy
Copy link
Owner

leniy commented Nov 21, 2017

--2017-11-21 16:03:15-- https://github.com/leniy/docker-cacti/archive/master.zip Resolving github.com (github.com)... 192.30.255.113, 192.30.255.112 Connecting to github.com (github.com)|192.30.255.113|:443... connected. HTTP request sent, awaiting response... 302 Found Location: https://codeload.github.com/leniy/docker-cacti/zip/master [following] --2017-11-21 16:03:16-- https://codeload.github.com/leniy/docker-cacti/zip/master Resolving codeload.github.com (codeload.github.com)... 192.30.255.120, 192.30.255.121 Connecting to codeload.github.com (codeload.github.com)|192.30.255.120|:443... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [application/zip] Saving to: ‘master.zip’

你用的哪个版本的docker?最新版本的docker-ce?

@wjy1100
Copy link
Author

wjy1100 commented Nov 21, 2017

1.12.6

@wjy1100
Copy link
Author

wjy1100 commented Nov 21, 2017

Server:
Version: 1.12.6
API version: 1.24
Go version: go1.6.2
Git commit: 78d1802
Built: Tue Jan 31 23:35:14 2017
OS/Arch: linux/amd64

@wjy1100
Copy link
Author

wjy1100 commented Nov 21, 2017

应该是您这个不支持 docker build 创建镜像把,我现在用 docker-compose up -d 试了下,看起来似乎可以,不过还在跑

@leniy
Copy link
Owner

leniy commented Nov 21, 2017

我用的:
Version: 17.09.0-ce
API version: 1.32

@leniy
Copy link
Owner

leniy commented Nov 21, 2017

找到问题了,是因为docker更新和变动的频次太高,不同的版本细节不同,如“自动创建不存在的目录”这一条,有的就不支持。

你在第32行
; mv /tmp/scripts/configured_cacti.sql /var/cactibackups/cacti_backups.sql \
的上面一条,添加上
; mkdir /var/cactibackups \
就可以了

@wjy1100
Copy link
Author

wjy1100 commented Nov 21, 2017

好的,我试试

@leniy
Copy link
Owner

leniy commented Nov 21, 2017

建议你安装最新的版本,现在api已经到1.32了,你安装的还是1.24
docker更新换代的太快

@leniy leniy closed this as completed Nov 21, 2017
@leniy leniy added the bug label Nov 21, 2017
@leniy leniy mentioned this issue Nov 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants