Tag: build立

如果另一个服务状态是0(成功),Docker-compose运行服务

我对Docker和Docker组合非常新。 我想用docker撰写来testing我的项目,如果testing好的话发布它。 如果testing失败,则不应该发布应用程序。 这是我的docker-compose.yml version: '3' services: mongodb: image: mongo test: build: context: . dockerfile: Dockerfile.tests links: – mongodb publish: build: context: . dockerfile: Dockerfile.publish ?? # I want to say here that publish step is dependent to test. 之后,在我的testAndPublish.sh文件中,我想说: docker-compose up if [ $? = 0 ]; then # If all the services succeed […]

docker工人自动构build标签expression式

我已经能够从https://github.com/restsql/docker自动构build主分支,但是我无法使用以下正则expression式select器(源字段)select任何标记: /*/ /^[0-9.]+/ /([0-9.]+/ /^[0-9.]+$/ 我已经尝试了以下标签名称(Docker标签字段): {sourceref} {\1} 有什么特别的酱汁让它起作用? 谢谢! 标记

在Docker容器中构build一个Docker镜像

我有一个docker容器,build立一个可执行文件并将其公开在共享卷上。 然后,我想另一个docker容器创build一个docker图像,并将其推送到本地存储库。 我一直在做一些阅读,这是可能的暴露dockersockets的容器。 我读过这是一个坏主意和安全问题。 我解决这个问题的方法是在virtualbox上使用docker-machine来解决问题,并且还find了一种将docker socket(在virtualbox中)连接到容器的方法。 然后,我看着docker运行docker,并允许它推到我的本地存储库在父docker,但我也对这种方法谨慎,因为我已经阅读它是真正的testingdocker,而不是什么即时通讯尝试。 提前致谢

无法为Docker开源开发制作开发环境图像

我正在尝试为Docker开源开发制作一个开发环境映像,但是我正面临以下错误。 我已经从他们的git页面克隆了存储库并在centos上运行它。 我在一家公司工作,并在Dockerfile中将代理设置为环境variables。 这是我得到的错误 – Ign http://deb.debian.org jessie InRelease Ign http://ppa.launchpad.net trusty InRelease Ign http://deb.debian.org jessie-updates InRelease Err http://deb.debian.org jessie Release.gpg Cannot initiate the connection to 8080:80 (0.0.31.144). – connect (22: Invalid argument) Err http://ppa.launchpad.net trusty Release.gpg Cannot initiate the connection to 8080:80 (0.0.31.144). – connect (22: Invalid argument) Ign http://security.debian.org jessie/updates InRelease Err http://deb.debian.org […]

jenkins用docker工具返回状态码128

我有一个与Jenkins和build设项目的问题:昨天一切工作find,没有任何configuration没有改变,没有插件或jenkins已被更新。 这是我的工作输出: ERROR: Error cloning remote repo 'origin' hudson.plugins.git.GitException: Command "git -c core.askpass=true fetch –tags –progress git@git.XXX:AAA/0YYY7.git +refs/heads/*:refs/remotes/origin/* –depth=1" returned status code 128: stdout: stderr: /tmp/ssh2047466924933280956.sh: 6: /tmp/ssh2047466924933280956.sh: ssh: not found fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1640) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1388) […]

在Docker容器中构build软件/如何pipe理?

假设我想将最新版本的AwesomeTool集成到Docker容器中(比如说运行CentOS),在这个容器中没有任何RPM可用(或者rpm不是最新的,我想运行最新的版本)。 所以我下载awesometool.tar.gz,解开它,configuration&& make && make install。 然后我意识到它已经在所有不同的位置,库,二进制文件,符号链接中安装了东西…我需要在“docker build”期间将所有东西放到我的Docker镜像中。 我是不是该: 1)在Docker镜像构build过程中进行构build,预先安装所有必需的工具(gcc,make等),或者在安装后将其移除。 2)在图像之外构build软件,然后find一种方法将所有安装构件复制或打包到图像中(基本上,您在制作RPM时将执行的操作)。 使(2)更容易的一种方法是将其安装到PREFIX中,并在Docker构build过程中将其复制到图像中,但需要将其复制到匹配位置,否则共享对象可能无法正确链接。 (1)的一个优点是构build被封装在Dockerfile中,但是除非完成特定的清理,否则可能会留下所有这些构build工件。 (2)的优点是docker图像更清洁,但需要外部构build步骤,并可能需要复杂的工作来追踪所有需要复制的工件….当新版本的AwesomeTool发布时可能会改变,因此需要保持。 其他人如何解决这个问题?

在Docker中使用buildpack-deps构build,但依赖关系似乎没有安装?

我正在尝试编写一个Dockerfile来构build基于“buildpack-deps:jessie-scm”图像的Kaldi(一个开源语音识别系统)。 这是我的Dockerfile: FROM buildpack-deps:jessie-scm RUN apt-get update RUN apt-get install -y python2.7 libtool python libtool-bin make RUN mkdir /opt/kaldi RUN git clone https://github.com/kaldi-asr/kaldi.git /opt/kaldi –depth=1 RUN ln -s -f bash /bin/sh WORKDIR /opt/kaldi RUN cd tools/extras && ./check_dependencies.sh RUN cd tools && ./install_portaudio.sh RUN cd tools && make -j 4 && make clean RUN cd […]

dockerbuild设失败; 无法parsingIP地址

我正在尝试使用一个软件创build一个Docker镜像,该镜像需要主机上的IP地址,而Docker镜像在构build过程中没有IP地址 有没有办法让图像中的一个networking接口在构build时有IP地址,以便软件安装可以成功? 它可能是任何IP地址,包括127.0.0.1,安装程序只是检查是否有一个IP地址。 这是它检查:1)主机有一个IP地址(可能是127.0.0.1)2)主机有一个主机名(它得到)3)主机名可以ping 4)'本地主机'可以ping 5 )“127.0.0.1”可以ping通 到目前为止,这是我所知道的要求。

在构builddockerfile时运行npm install时出错:npm ERR! git clone git @

在构build我的dockerfile时运行npm install时收到错误。 我不知道为什么会发生这种情况。 当我重新sorting,以便我执行“复制”。 在npm安装之前,它工作。 但我不想这样做,因为我需要重新运行npm安装每一次我重build我的图像和源代码中的每一个小的变化。 有人能告诉我为什么吗? npm安装只需要package.json运行正确? 为什么它看起来也依赖于源代码? 这是我的dockerfile: # Base docker image FROM debian:sid LABEL name="chrome-headless" \ maintainer="Justin Ribeiro <justin@justinribeiro.com>" \ version="1.4" \ description="Google Chrome Headless in a container" # Install deps + add Chrome Stable + purge all the things RUN apt-get update && apt-get install -y \ apt-transport-https \ ca-certificates \ […]

Docker,Django,节点和静态文件工作stream程

我有一个项目,我在后端使用Django,在前端使用Node.js。 在使用docker为前端安装库,运行gulp脚本,webpack,transpile scss,javascript,复制图像,字体等等时,我怀疑它们,然后将它们发送到S3。 我应该为此专门创build一个容器吗? 我什么时候安装库? 运行脚本并复制文件? 在构build图像时(在Dockerfile中)或实例化容器时? 如果在构build映像时必须安装库和复制文件,我应该在哪里做? 当我把它放在我的Dockerfile中时: WORKDIR /app ADD . /app 它似乎覆盖了文件夹,并删除了在安装和脚本执行过程中创build的所有内容。 我找不到真实的例子。 任何帮助是受欢迎的。 谢谢。