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.
Related
I've cloned a github repo and ran into roadblocks trying to set it up locally so used Docker's dev environment option on it. The repo needs tmux as part of the build process and I can't install it inside the Docker environment cause it's linked to the repo and there's no mention of it there
Tried brew install and then realised I'm inside a container...
You can just install it. I started docker a few hours back so I was confused.
Since its a Linux based image just run sudo apt-get update, then apt-get -y install curl and sudo apt-get install tmux in the docker cli
I'm trying to install nano , and when using the apt-get install nano command inside the docker, it asks to use the super user:
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
And when trying to use sudo he says it doesn't exist
bash: sudo: command not found
Most docker containers doesn't provide sudo util. If you need some software in your container you may create your images based on another that you need with installing necessary software by describing in dockerfile.
Also you may install sudo in your custom image.
For docker you need to test each command as running on the local host machine, you have many tools already installed, and the Docker images you have the minimum required usually, so only what is required is installed, and the docker image size can be small also.
Either have a look at what software is installed on the Docker image already using the command compgen -c and then install the software you would require which is not installed, or run your software and see if you receive errors or software not being found, and then install the software required.
Try this:
docker exec -u root -it <your_container_name> bash
and then apt-get install nano.
Installed docker on Centos (running using VirtualBox) following steps below:
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
sudo yum install docker
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
And I rebooted my virtual machine, and as I type 'docker --version, I get below:
"Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg. podman version 1.0.5"
Can anybody explain what is going on in my machine?
#swxraft if you run the commands in the order posted in your question
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
sudo yum install docker
sudo yum-config-manager --add-repo
https://download.docker.com/linux/centos/docker-ce.repo
you installed a docker in the REHL repo (probably an alias to podman). And then loaded the repo for the oficial docker but never installed from there.
Extra info:
A) installation docker
How to install docker: follow this link [1] instead #govinda-malavipathirana. Latest docker-ce needs a newer containerd.io but REHL is excluding the ones in the docker repo. So you need to install docker -ce with --nobest (see instructions and error in link). Also you need to disable the firewall.d to have DNS in docker.
B) why docker is not in REHL8
Docker cli and daemon are not supported by REHL8 and its derivatives and it is "blocked" in several ways. Why is not suported -> monolitic and old [2]
Docker images ARE supported using podman. The images created with docker work with podman and viceversa. Also podman commands are the same as docker client.
Podman is a substitute of docker (but it does not use a daemon). They recommend to add a symlink docker -> podman and you will not notice the difference [3]
[1]https://linuxconfig.org/how-to-install-docker-in-rhel-8
[2]http://crunchtools.com/why-no-docker/
[3]https://developers.redhat.com/blog/2019/02/21/podman-and-buildah-for-docker-users/
Docker will not support RedHat 8, it will be installed as Podman.
So you can try it with Amazon linux2 instead of RedHat.
You have to create a new instance in AWS with Amazon linux2, then it will work.
Since docker is not officially supported by REHL8/CentOS8. You have to install it by additional steps.
This is a good article I have found in the internet, shows how to install docker in CentOS 8.
https://computingforgeeks.com/install-docker-and-docker-compose-on-rhel-8-centos-8
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.
.
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.