[ 
https://issues.apache.org/jira/browse/MESOS-5953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15402767#comment-15402767
 ] 

Gilbert Song commented on MESOS-5953:
-------------------------------------

[~philwinder], understand your concern. You want the docker image created by 
Dockerfile using default working_dir can be executable in unified 
containerizer. We need to leverage the pros and cons:

1. Using mesos container sandbox:
Pros: Keep the semantics in mesos consistent. Any files/dirs under the sandbox 
will not be lost even the container is killed (bind mounted to host sandbox). 
Persistent volumes should be accessible in the container sandbox.
Cons: operators may need to add one more layer to the image to specify the 
working_dir as "/".

2. Using "/" by default:
Pros: will not break some docker images which has some default entrypoint/cmd 
using "/" as working_dir.
Cons: Semantic is not guaranteed to be the same in docker. semantics in mesos 
insistency.

> Default work dir is not root for unified containerizer and docker
> -----------------------------------------------------------------
>
>                 Key: MESOS-5953
>                 URL: https://issues.apache.org/jira/browse/MESOS-5953
>             Project: Mesos
>          Issue Type: Bug
>          Components: containerization
>    Affects Versions: 1.0.0
>            Reporter: Philip Winder
>
> According to the docker spec, the default working directory (WORKDIR) is root 
> /. https://docs.docker.com/engine/reference/run/#/workdir
> The unified containerizer with the docker runtime isolator sets the default 
> working directory to /tmp/mesos/sandbox.
> Hence, dockerfiles that are relying on the default workdir will not work 
> because the pwd is changed by mesos.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to