Andrew Schwartzmeyer edited comment on MESOS-8619 at 3/2/18 6:21 PM:

Review: https://reviews.apache.org/r/65872

was (Author: andschwa):
commit 9bd5d8f9b (HEAD -> master, apache/master)
Author: Andrew Schwartzmeyer <and...@schwartzmeyer.com>
Date:   Wed Feb 28 16:45:49 2018 -0800

    Windows: Fixed location of Docker's `config.json` file.

    Per MESOS-8619, Docker checks `$USERPROFILE/.docker/config.json`
    instead of `$HOME`. Mesos overrides this environment variable in order
    to point Docker to a `config.json` file in another location, so we
    have to fix the assumption we made about Docker.

    We do not add this constant to stout, because it is not consistent
    across Windows applications. This particular logic is specific to the
    implementation of Docker. Other applications might check `$HOME` or
    `$HOMEPATH` on Windows.

    Review: https://reviews.apache.org/r/65872

> Docker on Windows uses USERPROFILE instead of HOME for credentials
> ------------------------------------------------------------------
>                 Key: MESOS-8619
>                 URL: https://issues.apache.org/jira/browse/MESOS-8619
>             Project: Mesos
>          Issue Type: Bug
>         Environment: Windows 10 with Docker version 17.12.0-ce, build c97c6d6.
>            Reporter: Andrew Schwartzmeyer
>            Assignee: Andrew Schwartzmeyer
>            Priority: Major
>              Labels: docker, windows
>             Fix For: 1.6.0
> The logic for doing a {{docker pull}} of an image for a private registry 
> assumes that the {{.docker/config.json}} is to be found in {{$HOME}} 
> (according to the [Mesosphere 
> instructions|https://mesosphere.github.io/marathon/docs/native-docker-private-registry.html#docker-containerizer]
>  and the 
> [code|https://github.com/apache/mesos/blob/b7933c176d719766bdb6459048ede6e94f6a7763/src/docker/docker.cpp#L1710]).
> However, this assumption was only true for Linux per the [Docker 
> code|https://github.com/moby/moby/blob/3a633a712c8bbb863fe7e57ec132dd87a9c4eff7/pkg/homedir/homedir_unix.go#L14],
>  but on Windows, Docker explicitly looks at the {{USERPROFILE}} environment 
> variable, again [per the Docker 
> code|https://github.com/moby/moby/blob/3a633a712c8bbb863fe7e57ec132dd87a9c4eff7/pkg/homedir/homedir_windows.go#L10].
> So in order for Docker to pick up the config file correctly, we need to 
> change the variable used on Windows in the Docker containerizer.

This message was sent by Atlassian JIRA

Reply via email to