1

I have an issue of installing Docker on ubuntu 18.04

When I try the following lines I get an https error due to there being no http version and we are behind a company proxy so it fails.

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"

sudo apt update

Fails with.

Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification.

Is there an alternative way to install even for a one of version using curl or wget?

Is there a way of bypassing a proxy in the apt conf to tell it to ignore the certificate error?

Edit I tried with the [trusted=yes] flag but this didn't work I think because this reverts to http and there is no http URL.

Err:6 https://download.docker.com/linux/ubuntu bionic Release                                        
Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification.
E: The repository 'https://download.docker.com/linux/ubuntu bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
BigEd
  • 111

1 Answers1

0

From docker's site here are the steps to install docker:

Update apt package index

sudo apt-get update

Install the requirements for docker

sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common

Add Docker's GPG key

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

Note: You should check the key if it's correct. (Follow the link)

Add Docker's repository

sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"

Then update with apt

sudo apt-get update

And now you can install docker with apt

sudo apt-get install docker-ce docker-ce-cli containerd.io
Ugur Akgul
  • 64
  • 4
  • Many thanks for the quick response this was what I was following, unfortunately when the step to add Dockers repository I will still get the same https error. this is beacuse there is not http version and the company proxy won't validate the https . Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification – BigEd Jul 18 '19 at 13:57