Comments (7)
Install from the edge branch is successful.
from ansible-docker.
Hi,
Couple of issues here.
-
18.04 isn't available on stable. That's an edge release. The latest stable release is 18.03.
-
Docker recently changed their package name styles for 18.04 which broke backwards compatibility with older versions, so to combat that I added a role variable below:
# Full APT package name.
# Note: Docker versions 17.04 to 18.03 do not have that extra ~3 in the middle.
docker_apt_package_name: "{{ docker_version }}~{{ docker_edition }}~3-0~{{ ansible_distribution | lower }}"
If you want to use a release older than 18.04/edge you would need to remove the ~3
from that variable.
So in your specific case you would want to set:
docker_channel: "stable"
docker_version: "18.03.0"
docker_apt_package_name: "{{ docker_version }}~{{ docker_edition }}-0~{{ ansible_distribution | lower }}"
You can use the role's defaults for everything else.
from ansible-docker.
Ok, I understand now.
The best thing would be to do as suggested in the Docker documentation:
# apt-cache docker-ce
E: Invalid operation docker-ce
root@ubuntu:~# apt-cache madison docker-ce
docker-ce | 18.04.0~ce~3-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/edge amd64 Packages
docker-ce | 18.03.0~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
docker-ce | 18.03.0~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/edge amd64 Packages
docker-ce | 18.02.0~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/edge amd64 Packages
docker-ce | 18.01.0~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/edge amd64 Packages
docker-ce | 17.12.1~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
docker-ce | 17.12.1~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/edge amd64 Packages
docker-ce | 17.12.0~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
docker-ce | 17.12.0~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/edge amd64 Packages
docker-ce | 17.11.0~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/edge amd64 Packages
docker-ce | 17.10.0~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/edge amd64 Packages
docker-ce | 17.09.1~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
docker-ce | 17.09.1~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/edge amd64 Packages
docker-ce | 17.09.0~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
docker-ce | 17.09.0~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/edge amd64 Packages
docker-ce | 17.07.0~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/edge amd64 Packages
docker-ce | 17.06.2~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
docker-ce | 17.06.2~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/edge amd64 Packages
docker-ce | 17.06.1~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
docker-ce | 17.06.1~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/edge amd64 Packages
docker-ce | 17.06.0~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
docker-ce | 17.06.0~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/edge amd64 Packages
docker-ce | 17.05.0~ce-0~ubuntu-xenial | https://download.docker.com/linux/ubuntu xenial/edge amd64 Packages
docker-ce | 17.04.0~ce-0~ubuntu-xenial | https://download.docker.com/linux/ubuntu xenial/edge amd64 Packages
docker-ce | 17.03.2~ce-0~ubuntu-xenial | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
docker-ce | 17.03.1~ce-0~ubuntu-xenial | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
docker-ce | 17.03.0~ce-0~ubuntu-xenial | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
and set docker_apt_package_name
accordingly.
In particular, I managed to install version 18.03
of docker-ce
from stable with the following:
docker_edition: "ce"
docker_channel: "stable"
docker_version: "18.03.0"
docker_apt_package_name: "{{ docker_version }}~{{ docker_edition }}-0~{{ ansible_distribution | lower }}"
I think the best way to solve this problem is using the command above and then filtering the result to get the right package name, maybe I can make a pull request about this.
from ansible-docker.
Right. If you ran that command, parsed it and then compared it to the version supplied for a match, that would be a very welcome PR. Especially if it report helpful errors in the fail cases like "'18.04' is not available in the 'stable' channel".
I just slapped together the variable change for now just so people (myself included) could get 18.04 installed, but in a such a way where 18.03 still worked.
from ansible-docker.
@nickjj said:
Right. If you ran that command, parsed it and then compared it to the version supplied for a match, that would be a very welcome PR. Especially if it report helpful errors in the fail cases like "'18.04' is not available in the 'stable' channel".
I have opened a PR with a command that gets the package name in a variable, I don't know how to report errors and I could use some guidance about that.
Maybe it would cleaner to have a standalone script, so that error could be managed more easily?
from ansible-docker.
@nickjj said:
Especially if it report helpful errors in the fail cases like "'18.04' is not available in the 'stable' channel".
Ok, I have added a check.
If the command result is empty, i.e. no package is found, then a message like the following is printed:
TASK [ansible-docker : fail] ******************************************************************************************************************************************************************
fatal: [host]: FAILED! => {"changed": false, "msg": "Docker edition 'ce' version '18.04.0' is not available through the channel 'stable'"}
from ansible-docker.
This has been fixed but it's not pushed upstream yet. It will be in the next release.
from ansible-docker.
Related Issues (20)
- Support for docker.io package (in addition to ce and ee) HOT 4
- Failed : Install Docker's dependencies HOT 9
- Package dependency error for Docker installation on clean Ubuntu 18.04 HOT 11
- Ubuntu 20.04 ImportError: No module named pkg_resources HOT 10
- Avoid docker login issue with X11 HOT 11
- Expected behavior for DockerHub private repositories login options? HOT 19
- Failed to import the required Python library HOT 10
- Update apt cache before installing packages HOT 1
- Add way to add additional packages to install HOT 3
- Versioning pinning not working HOT 5
- Install Python packages: Could not get output from /usr/local/bin/virtualenv --help HOT 16
- Hi; Please consider suppressing credentials output in: Manage Docker registry login credentials HOT 8
- Upgrade edge case HOT 9
- I'm thinking about no longer setting up a virtualenv, pip installing docker / docker compose and switching the docker_login module to a shell script HOT 2
- docker not installed into /usr/local/bin HOT 4
- Unable to find pip in the virtualenv HOT 8
- Error in new v2.2.0 version when using ansible 2.9.14 HOT 3
- Docker Compose V1 causes the Install Python packages step to crash HOT 3
- Error with pip on basic usage HOT 2
- Task exception at: Install Python packages HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-docker.