2016-06-15 133 views
0

我想「構建」我的npm構建並使用它創建docker映像。這意味着我需要一個能夠a)運行npm和b)運行docker的docker映像。
目前我努力尋找/創造這樣的碼頭形象。我如何解決我的問題?
謝謝!NPM和Docker構建

編輯:
我設法把組合容器,但我的身材不是能夠找到一個正在運行的泊塢窗實例:
Post http:///var/run/docker.sock/v1.20/build?cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&memory=0&memswap=0&rm=1&t=registry.gitlab.com%2Ftss-repocar%2Fapp&ulimits=null: dial unix /var/run/docker.sock: no such file or directory. * Are you trying to connect to a TLS-enabled daemon without TLS? * Is your docker daemon up and running? Post http:///var/run/docker.sock/v1.20/images/registry.gitlab.com/tss-repocar/app/push?tag=: dial unix /var/run/docker.sock: no such file or directory. * Are you trying to connect to a TLS-enabled daemon without TLS? * Is your docker daemon up and running?

+0

如果你想使用泊塢窗功能於泊塢窗則對此有閱讀:HTTPS ://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/ –

回答

0

要建立泊塢窗圖片您的構建容器必須能訪問/var/run/docker.sock(或必須使用泊塢窗中泊塢)。

假設你有你的gitlab-ci-multi-runner在泊塢窗容器本身,改變/etc/gitlab-runner/config.toml看起來像這樣:

volumes = ["/var/run/docker.sock:/var/run/docker.sock", "/cache"]