Welcome to the Linux Foundation Forum!

LFS201 - Chapter 29 - Containers

This post is regarding the issue we had in today's office-hours - trying to execute a 'Docker run' command on an imported httpd image. We received an error: docker: Error response from daemon: No command specified.

I did some reading and this is what I found:

The error that we are getting means that the image import from the tar doesn't container a default command CMD line to start the container. Docker allows you to skip specifying the CMD in the docker file. In hat case we need to provide the command when doing docker run...something like this..

docker run -dit -p 8080:80 <> /bin/bash

Comments

  • luisviveropena
    luisviveropena Posts: 1,144

    Hi @VijaySethumadavan ,

    Yes, that's right. In our case, even if we were able to start the container from the imported image, the problem was that we couldn't access port 8080, even if it showed as listening in the OS.

    I'm still researching on this.

    Regards,
    Luis.

Categories

Upcoming Training