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

Service 'redis' failed to build Exited (139) 错误 #188

Open
2 tasks done
finsos opened this issue Mar 27, 2020 · 3 comments
Open
2 tasks done

Service 'redis' failed to build Exited (139) 错误 #188

finsos opened this issue Mar 27, 2020 · 3 comments

Comments

@finsos
Copy link

finsos commented Mar 27, 2020

  • Which environment: docker
  • Host OS: Debian
  • OS Version: 4.17.0-kali1-amd64
  • Docker version: 19.03.6, build 369ce74a3c
  • Compose version: 1.17.1, build unknown
  • Describe your bug: 构建镜像vulhub/weblogic/ssrf的时候出现Service 'redis' failed to build错误,Exited (139)错误,导致失败
  • 主机是否在中国大陆
  • 是否重试过仍然出现这个错误

其他信息

  • 经过排查发现是vulhub/cron镜像出了问题,单独启动该镜像也无法启动,报Exited (139)错误。
    后面重新编辑了Dockerfile修改from为其他centos基础镜像,之后build成功,就正常启动了。
FROM centos:latest

MAINTAINER phithon <[email protected]>

RUN set -ex \
    && yum -y update \
    && yum -y install make gcc-c++ tcl wget
  • 因此请测试一下vulhub/cron镜像,并重新推送
@phith0n
Copy link
Member

phith0n commented Mar 27, 2020

贴错误的时候需要把完整的错误信息贴出来。你贴的这个东西就好比“工作电脑A出现了‘蓝屏’错误”,但具体什么原因导致的蓝屏却没有贴出来。

issue模板里应该已经说了:

请贴出完整错误信息,可以是命令行输出、软件报错信息、截图等。
注意,请贴出完整错误信息,不要只粘贴错误的最后一行!

@finsos
Copy link
Author

finsos commented Mar 27, 2020

不好意思,是我没有完整说明。

  • 这是单独构建该Dockerfile时出现的错误:
Sending build context to Docker daemon  229.9kB
Step 1/10 : FROM vulhub/cron
 ---> 2cf795262563
Step 2/10 : MAINTAINER phithon <[email protected]>
 ---> Using cache
 ---> b98e2645cf6a
Step 3/10 : RUN set -ex     && yum -y update     && yum -y install gcc-c++ tcl wget make
 ---> Running in 05ba004d7659
The command '/bin/sh -c set -ex     && yum -y update     && yum -y install gcc-c++ tcl wget make' returned a non-zero code: 139
  • 这是构建使用的命令:
docker build -t cron_redis:v1 .
  • 这是我改了from之后构建的输出:
Sending build context to Docker daemon  229.9kB
Step 1/10 : FROM centos
 ---> 470671670cac
Step 2/10 : MAINTAINER phithon <[email protected]>
 ---> Using cache
 ---> fc03ed7974ab
Step 3/10 : RUN set -ex     && yum -y update     && yum -y install gcc-c++ tcl wget make
 ---> Using cache
 ---> 57de53096954
Step 4/10 : RUN set -ex     && mkdir -p /usr/src/redis     && wget -qO- http://download.redis.io/releases/redis-2.8.24.tar.gz | tar xz -C /usr/src/redis --strip-components=1     && cd /usr/src/redis     && make MALLOC=libc     && make install     && make clean     && cd /     && rm -rf /usr/src/redis
 ---> Using cache
 ---> 228ccabe2e49
Step 5/10 : RUN yum -y remove gcc-c++ tcl
 ---> Using cache
 ---> d00293996125
Step 6/10 : COPY docker-entrypoint.sh /usr/local/bin/
 ---> c4165931c117
Step 7/10 : RUN set -ex     && chmod +x /usr/local/bin/docker-entrypoint.sh
 ---> Running in dd9185324436
+ chmod +x /usr/local/bin/docker-entrypoint.sh
Removing intermediate container dd9185324436
 ---> a124c87e9932
Step 8/10 : EXPOSE 6379
 ---> Running in c030bf158372
Removing intermediate container c030bf158372
 ---> 33280515b16c
Step 9/10 : ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
 ---> Running in d86a2617ea21
Removing intermediate container d86a2617ea21
 ---> 7619fc4db389
Step 10/10 : CMD ["redis-server"]
 ---> Running in 5784ca3293d8
Removing intermediate container 5784ca3293d8
 ---> 0e56ffd591f8
Successfully built 0e56ffd591f8
Successfully tagged cron_redis:v1

@sikii7
Copy link

sikii7 commented May 6, 2023

基于vm的kali的虚拟机,搭建vulhub复现weblogic的ssrf漏洞时,发现和楼主一样不能拉起redis,但是我并不能找到dockerfile文件,修改docker-compose.yml文件更改镜像源发现还是不行,求大佬指教,万分感谢!!

`┌──(root㉿kali)-[/home/sikii/vulhub/weblogic/ssrf]
└─# docker-compose up -d

Creating network "ssrf_default" with the default driver
Creating ssrf_redis_1 ... done
Creating ssrf_weblogic_1 ... done

┌──(root㉿kali)-[/home/sikii/vulhub/weblogic/ssrf]
└─# docker-compose ps
Name Command State Ports

ssrf_redis_1 /docker-entrypoint.sh redi ... Exit 139
ssrf_weblogic_1 startWebLogic.sh Up 5556/tcp, 0.0.0.0:7001->7001/tcp,:::7001->7001/tcp

┌──(root㉿kali)-[/home/sikii/vulhub/weblogic/ssrf]
└─# ls

1.png 2.png 3.png 4.png 5.png docker-compose.yml README.md

┌──(root㉿kali)-[/home/sikii/vulhub/weblogic/ssrf]
└─# cat docker-compose.yml
version: '2'
services:
weblogic:
image: vulhub/weblogic:10.3.6.0-2017
depends_on:
- redis
ports:
- "7001:7001"
redis:
image: vulhub/baselinux:centos-6

┌──(root㉿kali)-[/home/sikii/vulhub/weblogic/ssrf]
└─# vim docker-compose.yml

┌──(root㉿kali)-[/home/sikii/vulhub/weblogic/ssrf]
└─# docker-compose up -d

Pulling redis (vulhub/baselinux:centos-7)...
ERROR: manifest for vulhub/baselinux:centos-7 not found: manifest unknown: manifest unknown`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants