Open tnolet opened 10 years ago
I found the cause for this behaviour. This flapping happens when artifacts or executables inside docker containers are not referenced by their full path name. Because deimos adds the -w /tmp/mesos-sandbox
switch for the working directory in Docker, all paths are off...
Not sure if this is a bug or just something people should be aware of.
This is similar to https://github.com/mesosphere/deimos/issues/49
I'm just not sure what the right thing to do is. Deimos puts URLs from the Mesos task in a directory which it mounts at /tmp/mesos-sandbox
so tasks can find the downloaded contents. It seems reasonable to set the working directory to that directory, too, so that frameworks which are unaware of Docker will still find the URLs they expect.
There is a patch under #49 to acknowledge the WORKDIR
directive but I do wonder if there is a better policy in general.
Having Deimos dump the URLs in the "right place" could perhaps be accomplished by:
RUN
to copy the downloaded files to .
Hopefully ENTRYPOINT
and CMD
and all that would be preserved in the new image.
I see the problem. I guess if everyone is fully aware that this is happening, there is not a big problem. Making your paths and urls fully qualified isn't always a nice way of handling things, but there are ways around it and in the end it's not a biggie.
Hi,
starting a simple container using Marathon/Deimos fails because for some reason it is fails on not being able to fetch a .jar file hosted on S3. The docker image is download correctly by a slave from the public docker repo, and can be run manually with no problems. The app inside the container is a simple 'hello-world' type java app.
Details:
mesos: 0.19.1 deimos: 0.4.0 marathon: 0.6.0-1.0 ubuntu: 14.04 trusty
docker image: tnolet/hello1 Dockerfile:
task file:
Error in stderr in mesos gui:
Error: Unable to access jarfile dropwizard-0.0.1-SNAPSHOT.jar
output from mesos.slave-INFO on slave:
Again. running the following command on the slave manually starts up the container with no problems:
sudo docker run -d -P tnolet/hello1