Closed ppeczek closed 6 years ago
Seems the problem was that for ubuntu 18.04 docker 17.03 isn't supported. But still, need to check if the problem of setting docker version still exists
Hey @ppeczek ,
I will try to explain how the version will be determined. Important is that package pinning will be used to ensure the version of installed package.
Write a file under /etc/apt/preferences.d/docker-ce
to pin the docker-ce package to the determined version. In this case I will be written to this
Package: docker-ce
Pin: version 17.03.*
Pin-Priority: 1000
This means that the latest patch will be also included. APT does the job for us to find the latest available package in the repository. https://github.com/solidnerd/terraform-k8s-hcloud/blob/master/scripts/bootstrap.sh#L8 Debian APT Pinning
Afterwards we pinned the package it will add the docker-ce ubuntu repository with the correct correct code name. For that we use lsb_release -cs
to determine the codename.
Then the normal procedure goes on.
Your described problem comes directly from docker because the don't support 17.03 on 18.04 and I think the won't in future. They will only release the recent version of docker in 18.04 . So I think this will be docker-ce 18.06
If you want to use ubuntu 18.04 and docker 17.03 you could do this by a workaround to install the 17.03 from the xenial repo but it's not supported by anyone.
For this you can replace:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
with
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
xenial \
stable"
I will close this now, because it's not a problem of this project.
Despite
installed version of docker is 18.03.1-ce. That produces error:
edit: indeed always the newest version is installed: