Docker Community Forums

Share and learn in the Docker community.

Newer for Docker, meeting a problem "The command '/bin/sh -c yum xxx' returned a non-zero code: 137"


(Jzelldincht) #1

Hi, I am a beginner for docker and want to create a environment container for apache (httpd) .

I am using subsytem Ubuntu of win10 system.
I have pull a pure centos image in my docker server.
docker images will show my centos:latest image

The steps of mine:

    • create a direcotry “build” and into it.
    • create a file named “Dockerfile” and put the content down blow:
   FROM centos:latest #(`docker images` will show my `centos:latest` image)
   RUN yum -y install httpd  #(just want to install a httpd software)
   RUN systemctl enable httpd.service 
   EXPOSE 80 
  1. run command : docker build -t centos:httpd .

image

Hope get the solution here, thank you.


(Werner Dijkerman) #2

Can you delete the image: docker image rm centos:latest and try again?

I just copy/pasted it locally on my Mac and all was fine:

 $ docker image ls
REPOSITORY                                        TAG                 IMAGE ID            CREATED              SIZE
centos                                            httpd               b5bce1779b04        About a minute ago   331MB

(Jzelldincht) #3

Hi, thank you for your reply.
I don’t know what you mean “delete the image”,
I want to create a new image which installed a httpd from an exsiting pure centos image (not officical one).

Is it possible that subsystem Ubuntu of Windows 10 causes the issue?