jenkins用shell脚本启动docker容器报错

猪猪十一 2017-02-10 06:34:08
Started by user zhushengjie
Building in workspace /var/jenkins_home/workspace/java-app
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https://git.oschina.net/zhushengjie/second.git # timeout=10
Fetching upstream changes from https://git.oschina.net/zhushengjie/second.git
> git --version # timeout=10
> git fetch --tags --progress https://git.oschina.net/zhushengjie/second.git +refs/heads/*:refs/remotes/origin/*
> git rev-parse refs/remotes/origin/master^{commit} # timeout=10
> git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision ad2ece7601fdcf0564216347b6fd8352068ddabc (refs/remotes/origin/master)
> git config core.sparsecheckout # timeout=10
> git checkout -f ad2ece7601fdcf0564216347b6fd8352068ddabc
> git rev-list ad2ece7601fdcf0564216347b6fd8352068ddabc # timeout=10
[java-app] $ /bin/sh -xe /tmp/hudson6525268925942869010.sh
+ REGISTRY_URL=192.168.181.129:5000
+ cp /root/apache-maven-3.3.3-bin.tar.gz /var/jenkins_home/workspace/java-app/maven
+ docker build -t csphere/maven:3.3.3 /var/jenkins_home/workspace/java-app/maven
Sending build context to Docker daemon 8.135 MB

Step 1/9 : FROM csphere/jdk:1.7.0
---> f1397a72d881
Step 2/9 : MAINTAINER Carson,C.J.Zeong <zcy@nicescale.com>
---> Using cache
---> 7e147cce145c
Step 3/9 : ENV MAVEN_VERSION 3.3.3
---> Using cache
---> 88c34cdbb58f
Step 4/9 : ENV MAVEN_HOME /opt/maven
---> Using cache
---> ec6ac9e7c6d0
Step 5/9 : COPY apache-maven-3.3.3-bin.tar.gz /opt/
---> Using cache
---> a9757b445106
Step 6/9 : RUN tar xzf /opt/apache-maven-3.3.3-bin.tar.gz -C /opt && mv /opt/apache-maven-${MAVEN_VERSION} /opt/maven && ln -s /opt/maven/bin/mvn /usr/bin/mvn
---> Using cache
---> 1c4075a5d1e5
Step 7/9 : COPY settings.xml /opt/maven/conf/settings.xml
---> Using cache
---> d6b7dad9c6fa
Step 8/9 : ADD hello /hello
---> Using cache
---> aa647c613f0d
Step 9/9 : RUN cd /hello && mvn clean install -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true
---> Using cache
---> 975f3a411c7b
Successfully built 975f3a411c7b
+ docker ps -a
+ grep -i maven
fab707d12db9 csphere/maven:3.3.3 "/usr/bin/supervis..." 9 minutes ago Created maven
+ docker rm -f maven
maven
+ docker create --name maven csphere/maven:3.3.3
60cd1520f536fc66f6f301515e2ff412537a57e6636fda21a7449f4adbd8736a
+ docker cp maven:/hello/target/hello.war /var/jenkins_home/workspace/java-app/hello
+ docker build -t 192.168.181.129:5000/csphere/hello:1.0 /var/jenkins_home/workspace/java-app/hello
Sending build context to Docker daemon 3.687 MB

Step 1/4 : FROM csphere/tomcat:7.0.55
[91m# Executing 1 build trigger...
[0mStep 1/1 : ADD . ${APP_DIR}
---> Using cache
---> 437d8c75fff9
Step 2/4 : MAINTAINER Carson,C.J.Zeong <zcy@nicescale.com>
---> Using cache
---> 30afb98ba885
Step 3/4 : ADD init /init
---> Using cache
---> d3b03948f722
Step 4/4 : ENTRYPOINT /init /scripts/run
---> Using cache
---> ec3189b35758
Successfully built ec3189b35758
+ docker push 192.168.181.129:5000/csphere/hello:1.0
The push refers to a repository [192.168.181.129:5000/csphere/hello]
cdd07f66369a: Preparing
9ac87f67de12: Preparing
f728a99fd601: Preparing
ed46f8ae79d8: Preparing
d01a6606b390: Preparing
b7c650f35997: Preparing
fde9df803484: Preparing
01ec24d052f5: Preparing
871820fa8a8e: Preparing
d07747dbfbbd: Preparing
1945b6a751a8: Preparing
555cede19b88: Preparing
ef884ade28d6: Preparing
01ec24d052f5: Waiting
871820fa8a8e: Waiting
d07747dbfbbd: Waiting
1945b6a751a8: Waiting
555cede19b88: Waiting
ef884ade28d6: Waiting
fde9df803484: Waiting
b7c650f35997: Waiting
d01a6606b390: Layer already exists
cdd07f66369a: Layer already exists
ed46f8ae79d8: Layer already exists
f728a99fd601: Layer already exists
b7c650f35997: Layer already exists
9ac87f67de12: Layer already exists
fde9df803484: Layer already exists
01ec24d052f5: Layer already exists
1945b6a751a8: Layer already exists
555cede19b88: Layer already exists
871820fa8a8e: Layer already exists
d07747dbfbbd: Layer already exists
ef884ade28d6: Layer already exists
1.0: digest: sha256:14f217c7f4462ad756cd90c36cfdf504fc4324ead665e4b784b2699fab3a3fad size: 3040
+ docker ps -a
+ grep -i hello
707fd45f6869 192.168.181.129:5000/csphere/hello:1.0 "/init /scripts/run" 9 minutes ago Created 22/tcp, 8443/tcp, 0.0.0.0:80->8080/tcp hello
+ docker rm -f hello
hello
+ docker run -d -p 80:8080 --name hello 192.168.181.129:5000/csphere/hello:1.0
89c04ea4d7783d0f8f66479868f46a05e4d75063d6746b6b45057487bd4b3d12
docker: Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "exec: \"/init\": permission denied".
Build step 'Execute shell' marked build as failure
Finished: FAILURE
...全文
4044 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
向幸福出发GO 2018-10-10
  • 打赏
  • 举报
回复
把shell贴出来
echo_susu 2018-02-27
  • 打赏
  • 举报
回复
docker: Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "exec: \"/init\": permission denied". 最后这句说明你没有权限
皇御雷霆 2018-02-24
  • 打赏
  • 举报
回复
执行权限问题
chengchow2001 2018-02-24
  • 打赏
  • 举报
回复
用root用户启动下,你账号没有权限
猪猪十一 2017-02-13
  • 打赏
  • 举报
回复
没人吗????????????

742

社区成员

发帖
与我相关
我的任务
社区描述
该论坛主要探讨Linux系统在IBM Power平台的安装、部署、应用开发等话题,并为网友们提供自由交流的平台。
社区管理员
  • Power Linux社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧