i'am trying to install Docker on my ubuntu 17.10 so i followed the instructions on the link :
https://docs.docker.com/install/linux/docker-ce/ubuntu/
sudo apt-get update
it shows
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
shows
what can i do please ?
I had similar issues installing Docker on a Ubuntu VM. This is what worked for me.
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt update
apt-cache policy docker-ce
sudo apt install docker-ce
And finally sudo systemctl status docker to check if it has installed properly.
symlinking the https dir in /usrLib/apt/methods to http seems to work:
$ cd /usr/lib/apt/methods
$ ln -s http https
Make sure you dont have any sources with https:// configured after apt-get install apt-transport-https it actually overwrites the symlink with the correct files.
After that run the docker installation script:
# remove old packages
$ sudo apt-get remove docker docker-engine docker.io containerd runc
# update
$ sudo apt-get update
# install dependencies
$ sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
# fetch rep
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# add stable repo
$ sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
# update
$ sudo apt-get update
# install
$ sudo apt-get install docker-ce docker-ce-cli containerd.io
This should work (from official docs)
Related
I want to install indy-sdk in ubuntu 20.04, but I can't find any documentation about it.
How can I install it?
Just follow the installation process here : https://github.com/hyperledger/indy-sdk#ubuntu-based-distributions-ubuntu-1604-and-1804
Try This, I have used the bionic version on ubuntu 20.04 and its worked.
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 68DB5E88
sudo add-apt-repository “deb https://repo.sovrin.org/sdk/deb bionic
master”
sudo apt-get update
sudo apt-get install -y libindy
There will be a file not found error if we write the repository incorrectly in apt-get. You can get the command on https://github.com/hyperledger/indy-sdk#ubuntu-based-distributions-ubuntu-1604-and-1804.
if you write wrong in this section, the file not found error will appear
sudo add-apt-repository "deb https://repo.sovrin.org/sdk/deb
(xenial|bionic) {release channel}"
So, dont use the () and {}, as follows :
sudo add-apt-repository “deb https://repo.sovrin.org/sdk/deb bionic
master”
Check if stable nodejs is installed. Try with node version greater then 10.
Follow below commands to install indy-sdk on ubuntu 20.04
apt-get update -y && apt-get install -y \
gnupg \
ca-certificates
apt-key adv --keyserver keyserver.ubuntu.com:80 --recv-keys CE7709D068DB5E88
echo "deb https://repo.sovrin.org/sdk/deb bionic stable" >> /etc/apt/sources.list
apt-get update -y && apt-get install -y \
libindy
Then you can install via npm:
npm install --save indy-sdk
https://www.npmjs.com/package/indy-sdk
I've got this error after update my docker on Linux Astra (Debian based OS). It happened when I was trying to run sudo docker run hello-world
Full text of the error:
docker: Error response from daemon: OCI runtime create failed: json: cannot unmarshal object into Go value of type []string: unknown.
sudo docker -v returns Docker version 18.09.7, build 2d0083d
Thanks to Алексей Козлов from ru.stackoverflow.com. The problem can be solved with following:
Remove the broken version of Docker
dpkg -l | grep -i docker
sudo apt-get purge -y docker-engine docker docker.io docker-ce
sudo apt-get autoremove -y --purge docker-engine docker docker.io docker-ce
sudo rm -rf /var/lib/docker /etc/docker
sudo rm /etc/apparmor.d/docker
sudo groupdel docker
sudo rm -rf /var/run/docker.sock
Install docker-ce
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/debian \
jessie \
stable"
sudo apt-get update
sudo apt-get install docker-ce
sudo apt-get install docker-ce-cli
Uninstall brocken version.
See answer #volkoshkursk
Add "frozen" repo
echo "deb https://download.astralinux.ru/astra/frozen/orel-2.12/2.12.13/repository orel contrib main non-free" >> /etc/apt/sources.list
apt update
Look all available package versions.
apt-cache madison docker.io
Install oldest.
apt install -y docker.io=17.12.1-0ubuntu1
Documentation
provides syntax to install specific version of docker-ce:
$ sudo apt-get install docker-ce=<VERSION_STRING> docker-ce-cli=<VERSION_STRING> containerd.io
On similar line, below dockerfile uses the above syntax:
FROM jenkins/jenkins:lts
ENV DEBIAN_FRONTEND=noninteractive
USER root
ARG DOCKER_GID=497
# Create Docker Group with GID
# Set default value of 497 if DOCKER_GID set to blank string by Docker compose
RUN groupadd -g ${DOCKER_GID:-497} docker
# Install base packages for docker, docker-compose & ansible
# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AA8E81B4331F7F50 && \
RUN apt-get update -y && \
apt-get -y install bc \
gawk \
libffi-dev \
musl-dev \
apt-transport-https \
curl \
python3 \
python3-dev \
python3-setuptools \
gcc \
make \
libssl-dev \
python3-pip
# Used at build time but not runtime
ARG DOCKER_VERSION=5:19.03.4~3-0~ubuntu-bionic
# Install the latest Docker CE binaries and add user `jenkins` to the docker group
RUN apt-get update && \
apt-get -y install apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common && \
curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg > /tmp/dkey; apt-key add /tmp/dkey && \
add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") \
$(lsb_release -cs) \
stable" && \
apt-get update && \
apt-get -y install docker-ce=${DOCKER_VERSION:-5:19.03.4~3-0~ubuntu-bionic} \
docker-ce-cli=${DOCKER_VERSION:-5:19.03.4~3-0~ubuntu-bionic} \
containerd.io && \
usermod -aG docker jenkins
ARG DOCKER_COMPOSE=1.24.1
# Install docker compose
RUN curl -L "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE:-1.24.1}/docker-compose-$(uname -s)-$(uname -m)" \
-o /usr/local/bin/docker-compose && \
chmod +x /usr/local/bin/docker-compose
RUN pip3 install ansible boto3
# Change to jenkins user
USER jenkins
# Add jenkins plugin
COPY plugins.txt /usr/share/jenkins/plugins.txt
RUN /usr/local/bin/plugins.sh /usr/share/jenkins/plugins.txt
fails at line below(on build):
apt-get -y install docker-ce=${DOCKER_VERSION:-5:19.03.4~3-0~ubuntu-bionic} \
docker-ce-cli=${DOCKER_VERSION:-5:19.03.4~3-0~ubuntu-bionic} \
containerd.io && \
where default values are retrieved from command: apt-cache madison docker-ce | awk 'NR==1{print $3}' in my local docker host
where docker-compose build gives below error:
Reading state information...
E: Version '5:19.03.4~3-0~ubuntu-bionic' for 'docker-ce' was not found
E: Version '5:19.03.4~3-0~ubuntu-bionic' for 'docker-ce-cli' was not found
ERROR: Service 'jenkins' failed to build: The command '/bin/sh -c apt-get update && apt-get -y install apt-transport-https ca-certificates curl gnupg-agent software-properties-common && curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg > /tmp/dkey; apt-key add /tmp/dkey && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") $(lsb_release -cs) stable" && apt-get update && apt-get -y install docker-ce=${DOCKER_VERSION:-5:19.03.4~3-0~ubuntu-bionic} docker-ce-cli=${DOCKER_VERSION:-5:19.03.4~3-0~ubuntu-bionic} containerd.io && usermod -aG docker jenkins' returned a non-zero code: 100
apt-get -y install docker-ce docker-ce-cli containerd.io is able to download and install the latest version of ubuntu packages, but why download and install of specific version of ubuntu package fails?
apt-get -y install docker-ce=${DOCKER_VERSION:-5:19.03.4~3-0~ubuntu-bionic} \
docker-ce-cli=${DOCKER_VERSION:-5:19.03.4~3-0~ubuntu-bionic} \
containerd.io && \
You've selected Docker versions based on what's available on your build host, not what's available inside the container image you're building. The jenkins:lts image is based on Debian Stretch, not Ubuntu Bionic.
Dockerfiles are actually just running fairly ordinary Docker operations. So, for example, you can run docker run -ti -u root jenkins/jenkins:lts /bin/bash, run your RUN scripts by hand, and check the apt-cache output inside the container:
# apt-cache madison docker-ce
docker-ce | 5:19.03.4~3-0~debian-stretch | https://download.docker.com/linux/debian stretch/stable amd64 Packages
docker-ce | 5:19.03.3~3-0~debian-stretch | https://download.docker.com/linux/debian stretch/stable amd64 Packages
docker-ce | 5:19.03.2~3-0~debian-stretch | https://download.docker.com/linux/debian stretch/stable amd64 Packages
docker-ce | 5:19.03.1~3-0~debian-stretch | https://download.docker.com/linux/debian stretch/stable amd64 Packages
docker-ce | 5:19.03.0~3-0~debian-stretch | https://download.docker.com/linux/debian stretch/stable amd64 Packages
Also, a failed docker build should leave the partially-complete image around; so you can use that directly to investigate a failure. As an example with a trivially failing step RUN false:
⋮
Removing intermediate container baaeab34bb8c
---> 6d34bab07796
Step 3/3 : RUN false
---> Running in 8347f442dfaa
The command '/bin/sh -c false' returned a non-zero code: 1
The 6d34bab07796 image is left around. You can pass that to docker run and investigate why the command failed. The 8347f442dfaa container is also left around, though exited; you can use the various docker container subcommands to investigate it as well.
I have installed ubuntu minimal in my virtual box (Ubuntu 16.04 LTS "Xenial Xerus")
I tried to install docker as follow:
apt-get update
apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - && apt-key fingerprint 0EBFCD88
dpkg -S add-apt-repository && add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/debian \
$(lsb_release -cs) \
stable"
apt-get update
apt-get install -y docker-ce docker-ce-cli containerd.io
curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -
s)-$(uname -m)" -o /usr/bin/docker-compose
chmod +x /usr/bin/docker-compose
but I have an error in this line
apt-get install -y docker-ce docker-ce-cli containerd.io
the error is:
I think you use the older docker commands for Ubuntu.
Try this:
If you have Docker already installed with apt-get - uninstall it.
sudo apt remove docker docker-engine docker.io
You need additional packages to allow apt use HTTP repositories. You can have them installed already, but run following to make it clear.
sudo apt install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
next
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Add docker repository to your /etc/apt/source.list
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
next
sudo apt update
and finally
sudo apt install docker-ce
I have a Ubuntu18.04 server and want to run docker in it to launch containers.
Because I have Windows locally, I planned to use Docker to launch the Ubuntu18.04 server itself. But there seems to be some problem with runlevels on Windows:
invoke-rc.d: could not determine current runlevel
This problem is already known, but without any answer yet.
I tried the following Dockerfile:
FROM ubuntu:18.04
ARG WORK_DIR="myapp"
WORKDIR ${WORK_DIR}
# some basic programs
RUN apt update && apt install -y \
zsh \
wget \
curl \
git-core \
vim \
emacs
#install docker
# https://answers.microsoft.com/en-us/windows/forum/windows_10-windows_install/errors-in-ubuntu-1804-on-windows-10/fe349f3d-3d58-4d90-9f8f-c14d7c12af8b
RUN cp -p /bin/true /sbin/ebtables \
&& apt update -y \
&& apt upgrade -y \
apt update \
&& apt install -y apt-transport-https ca-certificates curl software-properties-common \
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \
&& add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" \
&& apt update \
&& apt-cache policy docker-ce \
&& echo exit 0 > /usr/sbin/policy-rc.d \
&& export RUNLEVEL=1 && apt install -y docker-ce
RUN docker run hello-world
The apt install -y docker-ce raises the error.