I'm using Windows 7 Pro and have existing shared Docker engine running on a Linux. I would like to use my workstation (with development environment) to access shared Docker engine.
Does someone know how to retrieve Docker client only for Windows 7 ? I have no admin privilege, so I can't install Docker Toolbox.
Older Clients can be found here https://download.docker.com/win/static/stable/x86_64/
And here a some newer Builds by Stefan Scherer (Docker employee) https://github.com/StefanScherer/docker-cli-builder.
Just download docker.exe and add it to your windows path variable.
Then set your DOCKER_HOST variable to define against which Docker daemon you want to speak.
The official Downloads have finally been published:
Mac CLI binaries are available at
https://download.docker.com/mac/static/stable/
Windows CLI (and daemon) binaries at https://download.docker.com/win/
Linux CLI packages are available for each distro as docker-cli (deb and rpm) packages: https://download.docker.com/linux/ubuntu/dists/focal/pool/stable/amd64/
From: https://github.com/docker/cli/issues/2281#issuecomment-947699400
Although docker provides a REST-like API, there aren't many clients for it. A quick google turned up one on github, but ymmv. Even if you did find one, you're likely to run into the same problems involved in running docker-ce locally anyway.
There are a handful of gui clients that you could run on that engine and access with a browser, but if you are specifically after a cli you're SOL with this.
If you have an ssh client (git bash, or putty, or something), and you can arrange to run a bastion container on the engine, then you could run a container to ssh into and use that as if it's your local machine. You'd still have to scp resources onto it, but you'll eventually have to solve that problem anyway. Something like:
sudo docker container run --interactive --tty -v /var/run/docker.sock:/var/run/docker.sock image
Where 'image' is a linux image with an ssh server and appropriate keys, git, and docker installed. You could mount a local volume for persistence, or you could just keep everything in git.
Related
Docker can work decently remotely by defining DOCKER_HOST variable but now I do want to avoid installing the fat Docker for MacOS which also installs and starts the docker engine on a VM, one that seems to consume resources.
As docker work remotely it should continue to be able to build images, list images, start and stop them without having a docker servic/vm mac.
How can I do this? (docker cli seems to be come only with the entire cow).
I guess you are looking for install-client-binaries-on-macos.
Docker company afford some prebuilt binary, just download here, unpackage it, then you will find a standalone docker client binary there, copy it to your mac, out of the box for use.
There seems to be no install of the client only; but after installing the fat cow, you can tell it to stay off your grass by unchecking Start Docker Desktop when you log in in the preferences, and then shut down the Docker server.
That's what I do, and when I need docker locally I just start and then after using it, I shut it down again.
Has anyone succeeded in running fabric-composer on windows 10 linux sub-system running ubuntu 16.04 ?
You can run composer on windows 10 WSL (windows Subsystem for linux) but you will not be able to run docker containers in it. Linux Docker containers require a linux kernel and WSL doesn't have a linux kernel. It is a clever piece of technology that converts user space Linux API calls dynamically to windows API calls.
Therefore you will have to run hyperledger fabric either by using docker for windows (which runs it for you in hyper-v) or you run your own hypervisor.
It is possible to have the docker commands run in WSL but it will need to configure it to interact with the docker daemon running inside a hypervisor.
Yes, you can use Hyperledger-fabric-composer on windows 10, but as david said in above answer you will not be able to run docker containers directly from Ubuntu sub-system.
To do that you have to do following things:
METHOD:- 1
You will need to install docker CE Client & docker-compose in Ubuntu Subsystem and install Docker(version v17.09) on Windows as well. But those dockers won’t connect together out of the box.
So you need to expose the daemon to port 2375 first by right-clicking the docker icon on task-bar then click setting then check the Expose daemon box.
Now the docker server will be able to connect via Windows network including Ubuntu subsystem. We need to set environment variables in Ubuntu by running below command:
echo "export DOCKER_HOST='tcp://0.0.0.0:2375'" >> ~/.bashrc
source ~/.bashrc
These commands will add DOCKER_HOST to the variables every time we start a new Bash.
METHOD:- 2
If you don't want to use ubuntu sub-system, then you can simply install Git Bash and Docker(version v17.09).
Then install Hyperledger-Fabric by using Git Bash.
I am trying to connect my Windows 10 Home system to be able to run full Linux OS Docker containers. I have installed Docker on both WSL Ubuntu 18.04 as well as a VMware Ubuntu 18.04.
I was trying to follow this guide.
However, I get stuck trying to configure the Daemon as per the instructions.
Can’t use Docker for Windows?
This is only necessary if you are NOT running Docker for Windows!
No problem, just configure your Docker daemon to use -H tcp://0.0.0.0:2375 and --tlsverify=false. Then you can follow along with the rest of this guide exactly.
If you go down this route, I highly recommend rolling your own VM with VMware Player instead of using the Docker Toolbox because VirtualBox has crazy edge case shared folder bugs that will ruin your life at some point. Don’t worry, VMware Player is free. Just Google how to set up Ubuntu 16 server on VMware Player.
When I try to change the Docker Daemon by making a daemon.json file I get errors. I've also tried editing the .profile files and the .bashrc as per other guides (another guide), with no luck.
I am unable to check the DOCKER_HOST variable on the VM Ubuntu.
Don't make things complicated. In your case, why WSL if you just want to connect to a remote daemon? Why not simply use the windows docker client?
Setup you favorite local VM with docker.
Example: I have installed a CentOS distro running on local VMWare Workstation. All Hyper-V of course deinstalled/deactivated.
In this VM, enable tcp access for the daemon.
If you have a systemd linux distro (like mine CentOS), execute this:
sudo mkdir -p /etc/systemd/system/docker.service.d
sudo echo '[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H unix:// -H tcp://0.0.0.0:2375' >> /etc/systemd/system/docker.service.d/options.conf
sudo systemctl daemon-reload
sudo systemctl restart docker`
Test if the port is open with docker info. You should get an API access warning at the bottom result.
Download the Windows docker cli zip from here: https://download.docker.com/win/static/stable/x86_64/
Move the docker.exe to any folder, for ex. your Documents folder.
Then put this folder path into your Windows PATH variable.
Set the docker host: Open PowerShell, execute setx DOCKER_HOST <VM-IP>:2375 and close it.
Open a new PowerShell and call docker info.
You should see the docker and daemon infos.
Do what ever you like now... :-)
I just install the Windows 10 Anniversary update which has a new feature that linux child system. So I try to run docker in Windows 10 ubuntu bash(linux child system). Why I want to install docker in linux child system is because:
Windows 10 native docker 1.12 need Hyper-V, but Vmware couldn't run if Hyper-V enable. I have a lot images created by Vmware, it isn't so easy to switch to Hyper-v
I don't want to use Docker Toolbox, it need install VirtualBox, just redunant.
apt-get is fine, docker install success, but fail to start.
$ sudo service docker start
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
* Starting Docker: docker [ OK ]
$ docker ps
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
I have seen this post can-you-run-docker-natively-on-the-new-windows-10-ubuntu-bash-userspace, some people says that it is no posible to run docker in such linux child system, but there also some contrary opinions.
So, I want to ask is there any way to walk around this? Or I have to wait MS update this child system(since it is still beta now).
You have two Problems in there:
the linux child system does not provide the upstart service like e.g. ubuntu. You can work around this by running the docker deamon directly in foreground with docker daemon ...
This does nearly shure not work because docker requires features of the linux kernel like namespaces and capabilities. I don't think the NT-Kernel does implement such exotic features.
I want to work on an aws machine for a kaggle competition. While working on my own pc i have Anaconda installed, pycharm.
How do i set it up on an AWS machine?
Do i need to install the tools each time i log in the AWS machine.
What is the recommended way for this cases?
I thought of running a jupyter notebook instance on the remote machine, and connect to that web page via my local machine.
What are the pitfalls to be expected?
You need to launch an EC2 instance in AWS and connect it through SSH to run your algorithms. The following link can help you further.
http://www.grant-mckinnon.com/?p=6
In these cases using Docker images helps the best in encapsulating the environment. Kaggle also uses docker to create environments for kernels. You can install Docker from here. You can pull the docker image using following command,
docker pull datmo/kaggle:python
After this, you can run containers using this image and mount necessary files in order to run the same environment.
docker run --rm -it -p 8888:8888 -v ~/.:/home/ datmo/kaggle:python 'jupyter notebook'
You can also use datmo CLI in order to easily setup environment and also version control your machine learning models.