installing docker cloud cli on windows - docker

I am new to docker and setting up the environment in my windows 7 laptop to begin learning. I installed docker through docker toolbox. To install docker cloud cli, I followed the official documentation
https://docs.docker.com/docker-cloud/installing-cli/#install
I opened the quick start terminal and executed :
docker run dockercloud/cli -h
but while verifying the cloud version I am getting error 'bash: docker-cloud: command not found'.
Then I tried executing with pip command but didnt work.
I have below tools installed :
Python 2.7.13
Docker version 17.05.0-ce, build 89658be
docker-machine version 0.11.0, build 5b27455
and I have also verified that the docker engine is in running status.
Any help is appreciated.

The docker-cloud commands is not installed as part of the Docker Toolbox installation.
The first command that you run is running a docker container that does run the Docker Cloud CLI. Running this container also is not a way to install the docker-cloud command directly to your windows host. You can always invoke the same 'docker run dockercloud/cli' command to run the CLI containerized.
Similarly, the pip command is not installed as part of the Docker Toolbox installation. pip is something I would expect to be installed if you install Python on your windows system.
If you take a look at: https://docs.docker.com/docker-cloud/installing-cli/#install, the section for installing docker-cloud on windows does include this piece of advice:
If you do not have Python or pip installed, you can either install Python or use this standalone pip installer. You do not need Python for our purposes, just pip.
You did mention that you have python installed, but you are still getting "command not found" when you try to run pip. That could simply be a problem with the $PATH in the quickstart terminal. I would recommend trying the pip command from a powershell window rather than the quickstart terminal. If you do have the pip command somewhere on your system, make sure that the location it is installed to does appear in your $PATH in the bash inside the quickstart terminal.
Once you have pip installed, and in your $PATH, you should be able to run the pip install docker-cloud command.
It would also be a good idea to make sure that the directory holding the installed docker-cloud binary will also appear in your $PATH inside the quickstart terminal.

Related

Will GitLab docker executor open login shells?

I've installed GitLab's omnibus installer as a docker container, as well as the GitLab runner in another container. I registered the runner to use the docker executor with a default image that I've built on top of Ubuntu 18.04.
The image that I've built has rvm and nvm for installing different versions of Ruby and Node. However, when GitLab tries to run my CI pipeline on that image, it can't launch the rvm or nvm commands.
$ nvm install $NODE_VERSION
bash: line 115: nvm: command not found
I think the default installation of both rvm and nvm require you to launch a login shell, in order to make the rvm and nvm commands available.
After a bunch of messing with .bashrc, I got the rvm command to work, but is there a way to just make the CI pipelines launch in login shells?
Is there a way to dump the exact command that the GitLab runner is using to launch the CI pipeline? I think I found the source code, but it would be nice to just dump the docker command arguments. I tried setting the log_level to debug, but I didn't notice any difference.

unable to install docker in my conda environment

I have been trying to install docker in a conda environment on a slurm server
I first tried
conda install -c conda-forge docker
but I got
PackagesNotFoundError: The following packages are not available from current channels:
docker
Then I tried
pip install docker
which seems to install it successfully but when i try to run docker I get
command not found
in another post someone who had a similar problem resolved it with
sudo pip install docker
but this is not an option for me cause this is a server and I do not have administrative privileges
I am using miniconda and my conda version is 4.9.2
any help will be greatly appreciated
Docker cannot be installed with Conda or from PyPI - only Python APIs are available (docker-py on Conda Forge; docker on PyPI). Docker itself requires elevated privileges to install.
FWIW, none of the HPC systems I've worked on allow Docker, but do provide Singularity instead.

How to create a .bat file to install docker-desktop on windows 10 pro

I'm creating a project that runs inside a docker container, my project used to run on Linux but now I need to add support to Windows 10, but the user needs to install docker I used to have a shell script .sh file that installs Docker and docker-compose on ubuntu.
But I wonder if there is a easy way for the user to install docker-desktop on windows without going to the docker website and downloading the installer and installing it.
can I use a .bat file to automate that process and maybe use choco windows package manager or another way?
You can install Docker For Windows using Chocolatey:
choco install docker-desktop
Here's the package's page.

download and run ubuntu-desktop with gnome support via docker

I am completely new to docker. I have a Redhat 7 desktop with docker installed.
I now want to run a full fledged ubuntu-desktop 18.04 (including its gnome GUI) via docker. How can this be done? I have been googling for instructions/tutorials on where I can download an ubuntu 18.04 docker image (with GUI support) and run it, but surprisingly I cannot find anything. Can someone help me? Thanks.
I have a different situation, where I run docker on a Windows10 platform. I also tried to install Gnome for some Ubuntu image and start a gnome-session from the terminal. I did not manage to do so.
My current solution is to use Mate instead of Gnome. Maybe my steps are helpful for others that just started with docker:
Install Docker Desktop on Windows 10 and start the Docker application
Install vcxsrv and start it with Xlaunch (also see https://dev.to/darksmile92/run-gui-app-in-linux-docker-container-on-windows-host-4kde)
Get the IP of your computer with ipconfig, e.g 192.111.999.9
Open a console with admin rights and start a docker container. Pass some DISPLAY-Information including your IP:
docker run -it -e DISPLAY=192.111.999.9:0.0 --privileged --name=ubuntu ubuntu
You should then see a linux prompt
Update the package-manager and upgrade existing packages:
apt-get update
apt-get upgrade -y
apt-get update
start dbus service to avoid dbus warnings (also see https://georgik.rocks/how-to-start-d-bus-in-docker-container/):
dbus-uuidgen > /var/lib/dbus/machine-id
mkdir -p /var/run/dbus
dbus-daemon --config-file=/usr/share/dbus-1/system.conf --print-address
install mate (and some themes to avoid theme warning)
apt-get install mate-desktop-environment -y
apt-get ubuntu-mate-themes -y
start a Desktop session with
mate-session
Good luck!
(If you want some more programs, instead of "mate-desktop-environment", you can also use the larger package "ubuntu-mate-desktop". Will take > 10 min to be installed.)
This is an atypical use case for Docker. Docker is normally used to run applications via the command line, or on a server without GUI support. Most operating systems in docker images ship without GUI support.
However, you can enable GUI support with X11. Only with containers that support it though, and not with Ubuntu as far as I can tell. More details on this blog post: https://blog.jessfraz.com/post/docker-containers-on-the-desktop/
For now, just run docker run -it --rm ubuntu:latest bash and you'll launch an Ubuntu 18.04 shell (at the time of this post).

docker supposedly installed but not runnable

If I do a docker command like
docker -version
I get the error that docker is not installed and that I can do sudo apt-get install docker to install it. If I do this, it says that docker is the latest version. Do I need to set some kind of path to the binary to get it to run?
If I do which docker, there is no answer.
I have found the answer to the question.
Apparently there is a package called "docker" which has nothing to do with docker the container software which is actually docker-ce. The application I had installed was the fake docker, not the container-ware.
To install docker-ce there is a process given on Digital Ocean which can be used.
.

Resources