Not able to execute RUN commands in Dockerfile

Contents of the Dockerfile:

FROM XYZ
MAINTAINER ABC
RUN echo "hello world"
EXPOSE 80
ENTRYPOINT ["/usr/sbin/httpd","-D","FOREGROUND"]

When I try to build an image from this file, I see the following:

  • Docker link container as build argument
  • Docker for Mac: Host network and port publishing
  • Having Docker access External files
  • is it possible to run shell script and then node app.js inside docker container
  • Windows Docker in PyCharm - How to locate files on my host computer?
  • Nodejs application not running by using docker compose
  • permission denied Removing intermediate container

    when docker tries to execute the RUN command

    Observations:

    • This error is irrespective of the content of the RUN command.
    • Removing it ensures the build completes without issues.
    • I am able to build from the same docker file and image on another host.
    • “docker info” produced similar information on both machines.

    How can I debug this further to see what the issue is?

    Update (in response to the comments below):

    • I have been able to build the same image (and others) on this instance before
    • The issue occurred irrespective of the base image used
    • The issue was specific to this one instance which is running CentOS
    • The user I was logged in as was different from the user the daemon was running as (root)

    Assuming the issue may have been because of the user mismatch, I changed to root and tried the command. It went through without issues. Then, I changed back to the original user, removed the image and tried again: it went through again! The original issue is not reproducible anymore.

  • Deploy to JBoss from Docker Jenkins Container
  • Docker Debian install fails
  • Problems connecting pycharm to remote interpreter via docker
  • Chrome browser keeps crashing when running on android emulator in docker container
  • AWS ECR Authentication Test
  • Resources required for running application on server VS running application in LXC container?
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.