How can I SSH into the Beta's MobyLinuxVM

We’re working on making this a setting from the systray menu - it should land in the next beta which is imminent.

5 Likes

Fantastic. Thanks for listening to the feedback. Looking forward to playing with that!

I was looking for ssh access to set the http proxy. I want to be able to set the proxy for the VM since docker for windows does not work behind our corporate proxies.

A variant of How can I SSH into the Beta's MobyLinuxVM is to use nsenter on PID 1. Build a Docker image that has nsenter inside, like this:

FROM alpine
MAINTAINER You <you@example.com>
RUN apk update && \
    apk add util-linux && \
    rm -rf /var/cache/apk/*
ENTRYPOINT ["nsenter", "--target", "1", "--mount", "--uts", "--ipc", "--net", "--pid"]

Then you can “docker build . -t hostenter” and enter the host with “docker run --rm -it --privileged --pid=host hostenter”:

PS C:\Users\You> docker run -it --privileged --pid=host hostenter
moby:/#

I was able to add the mfsymlinks option to my Windows mounts using this approach.

2 Likes

Is it possible to install docker plugins such as Rancher Convoy without SSH?

Running docker images to look at the filesystem of the MobyVM is useful and educational, but still no good if you are wanting to do anything which requires restarting the docker engine. e.g. installing plugins, changing drive sizes, defaults for DNS, etc. Some of these options are in the UI…

I am running the latest beta and can see that the tray app has a UI to set some settings, which is helpful. However, in my case I some SSL certs that need to be trusted (I’m behind a transparent SSL proxy and need to trust its CA certs). Is there a way to do that?

1 Like

Hi Michael,

Is it enabled now? Will i be able to SSH to MobyLinuxVM with latest docker for windows beta release 1.13.0-beta38 (9805)

Is it enabled now?
I want to change ip/port mapping but do not want to recreate the container.

Any update? I need to be able to ssh into the host machine ASAP.

You can already mount the Docker socket, and instead of trying to use a binary from the Moby host, you can run a container that has the Docker CLI binary in it, like this one: Docker

I’m just learning about docker volumes and try to figure out how to copy files from volume (for back-up purpose for example) and the first thing that come to my head was to SSH to MobyLinuxVM. But apparently it’s imposible.
Does anybody know how actually I’m supposed to copy content of docker volumes in Docker for Windows?

Does anybody know how actually I’m supposed to copy content of docker volumes in Docker for Windows?

Start a container with the volume and use docker cp: docker cp | Docker Docs

Thank you!
I managed to copy files from mounted volume by passing container’s destination path of mounted volume :slight_smile:
But is it possible to copy volume’s data from volume that is not mounted (unused)? Do I always need to mount volume to container to copy it’s content?

Not with Docker for Mac or Windows

Is it now possible to navigate into MobyLinuxVM in a secure way? I need to change conf of some file of the MobyLinnuxVM but i cannot find a safe solution…

I would like to see this enabled too.

Can I use your concept to mount a network drive on the host (MobyLinuxVM)?

I’m executing the following, but I think it is actually mounting the network drive to the temporary container

docker run --net=host --ipc=host --uts=host --pid=host -it --security-opt=seccomp=unconfined --privileged --rm -v /:/host alpine /bin/sh
chroot /host
mkdir -p /mnt/fs01.mycompany.loc/y_drive
mount -t cifs //fs01.mycompany.loc/y_drive /mnt/fs01.mycompany.loc/y_drive -o username=myusername,password=mypassword

Do you know how I can mount a network drive on the host (MobyLinuxVM)? I’m trying to find a workaround to what seems to be limitations in docker.

Now, do you have a better solution?

How can I found out Kafka installed inside MobyLinuxVM. I need to modify zookeeper.properties.