Upcoming Maintenance Alert:

The UBNT Community will be upgraded at 5pm MDT on April 25th. During this time the community forums will be set to read-only status.

Learn more

×
Reply
Regular Member
Posts: 555
Registered: ‎02-04-2015
Kudos: 340
Solutions: 22

docker won't install with apt-cacher-ng

I tried to install unms 8.0 and as the script was flying along adding keys to my keyring and modifying sources.list it failed after running apt-get update.

 

Looking at the script, I don't think there is any issue with the script for unms but rather the docker install script itself that the unms script downloads from get.docker.com.  It adds

 

deb [arch=amd64] https://download.docker.com/linux/debian stretch edge

to sources.list with this line

+ sh -c add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian stretch edge"

then the next command

+ sh -c apt-get update

fails with an error and stops the entire script because apt-cacher-ng can't proxy https requests. 

 

Normally to use apt-cacher-ng together with https you make entries like this

 

deb [arch=amd64] http://HTTPS///download.docker.com/linux/debian stretch edge

this uses an http connection between your client and apt-cacher-ng, but tells apt-cacher-ng to use an https connection to the server.  I tried adding this manually and running the script but all it does is re-add the https:// entry and fail to update again.  So the workaround is to take the proxy setting out of /etc/apt/apt.conf , then take HTTPS/// out of all of your entries in sources.list, run the install, and then change everything back.

 

Since docker is already installed at this point I don't think you would have to apply the workaround every time you update. 

Ubiquiti Employee
Posts: 316
Registered: ‎01-26-2017
Kudos: 82
Solutions: 32

Re: docker won't install with apt-cacher-ng

[ Edited ]

@poisonsnak 

Thank you for reporting the issue, but I'm afraid this is not something we can fix on our side.

 

Docker is a pre-requisite for running UNMS. When the installation script detects that Docker is missing, it will try to install it for you using the default installation method. If that doesn't work on your system, I would recommend installing Docker manually before running the UNMS installation script. The script will detect that Docker is already installed and continue, whether you are installing for the first time or updating to a new version. 

 

The issue of the Docker installation script being incompatible with apt-cacher-ng is something to discuss on the Docker forums.

 

Regular Member
Posts: 555
Registered: ‎02-04-2015
Kudos: 340
Solutions: 22

Re: docker won't install with apt-cacher-ng

Right, I did mention it was the docker install script.  I didn't expect you guys to be able to fix it, just wanted to post what happened and a workaround.  If I was an end user of docker I would think about it but I am only using it because it is required for unms.  If you guys want to report it to docker you can but it's up to you.  Both packages are fairly popular so I am sure they probably already know and suggest a workaround.

 

Thanks for posting another workaround, I didn't think of installing docker manually myself.  That probably would be less work than what I posted.

Reply