I created a data container containing static HTML files that are intended to be used by the nginx container. The goal is that my webapp provides a volume that nginx can use.
For this reason, I created a simple Docker file:
FROM scratch MAINTAINER me < me@me.com > ADD dist/ /webappp/
When I launch the created container from the command line run -d -v /webappp --name webapp myOrg/webapp echo yo
I get an error message Error response from daemon: Cannot start container db7fd5cd40d76311f8776b1710b4fe6d66284fe75253a806e281cd8ae5169637: exec: "echo": executable file not found in $PATH , which, of course, is correct because the image does not have any commands at all. Starting a container without a command is not possible.
Although this error on the command line is not a big problem for me, because I know that the data container is still created and nginx is now available, it turns out that this is not the case if I want to automate it using Vagrant. Because of this error, automatic processes always fail.
My only solution so far is to extend my small handy image from the distribution, which IMHO does not make sense for a data-only container, just to cause an echo or true!
Is there a NOP exec command in docker or is it required that docker always do something, is it possible to start a container from scratch that does nothing or does not cause an error.
source share