-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide RPM and DEB packages for compose #2235
Comments
I would recommend to just work with the respective Debian and Fedora/CentOS communities and get that rolled into the default system repositories.' Just my $0.02 |
That ends up being less than optimal for a project that's moving as quickly as compose. You'll just end up with a pile of people coming in reporting that new features aren't working. Better to have a PPA so that you can do updates outside of the distro release cycle. |
It sounds like there is a deb for it (https://packages.debian.org/sid/docker-compose) but it's already a few versions behind. |
And a fedora package https://admin.fedoraproject.org/pkgdb/package/docker-compose/ |
Couldn't this be done in the same way as https://docs.docker.com/installation/ubuntulinux/ and https://docs.docker.com/installation/fedora/? i.e. host on *.docker.org |
Hosting the packages is the easy part. Most of the work here is making sure the package works for older versions of distros. |
Would you consider doing this once development pace has stabilized? |
What about putting the docker-compose binary that is also available at the GH release into DEB/RPM? Creating such a package with fpm should be very easy. We've done similar things at work (sorry private repos) and put some integration tests behind the build to test the DEB/RPM package at CircleCI within debian/centos Docker containers. If there is interest in such things I can check if we can open source that parts as an example. |
I totally agree that it would nice to have it packaged but for ubuntu I don't think it's useful to add another PPA. I would rather like to see current docker compose in the already existing repository. @dnephin apt repositories can have different packages per distribution anyway and as the other docker packages are already included it even should be easier to manage that compose and docker work nicely together. Therefore I think providing automatic builds for the official docker repos should be in focus here (and not creating additional repositories). |
@alexanderadam That's a good way to get outdated bug reports. A PPA makes much more sense for a target that moves as quickly as docker+compose. Indeed that's why people prefer to use the docker PPA. What's in the ubuntu/debian repos just doesn't keep pace. |
@atrauzzi unless I'm misreading, @alexanderadam is suggesting to host docker-compose in the docker repository (https://apt.dockerproject.org/), not rely on the the ubuntu/debian packagers. |
Good enough! :) |
There is also this possibility. Run this shell script as
|
@ksylvan Why |
Also |
What would there be need for in order for the solution of the issue to go on? |
I doubt that anybody from the Docker team had a look on it. @fsateler, in case you are the packager of the Debian package: is there anything particular to think of when packaging |
@alexanderadam yes, I am the downstream maintainer. I would of course be delighted to have help maintaining the debian package, but if you want to maintain an out-of-band package that is fine too. If you go the out-of-band way, please consider the following:
The linked dh-virtualenv above looks like it addresses the above three problems by shipping the complete venv into The alternative would be to have multiple repositories for the different releases, but that would be IMO much more trouble than it is worth. PS: yes, the debian package is a bit behind, but that is mostly resolved, hopefully (we have now 1.8.0). We were stuck a while waiting for newer versions of some dependent modules. |
I think providing a snap or flatpak package could solve the dependency issues. Opinions? |
So why isn't there already at least just a package with the binary in it? After poking around how exactly this binary is generated, it appears it's dynamically linked, so I guess there are concerns about breaking compatibility with older distros, but right now your "upgrade" steps are basically "blast over the old binary and hope it works", so I don't particularly see that as any sort of regression (i.e. the dependencies aren't specified as-is, and neither are compatible distros, so slapping the binary into a package would be no worse than the current scenario, and in some ways actually better, since it permits users to install I guess |
@jasonmp85 just to clear this up: as mentioned earlier there are actually packages and fsateler (maintainer of the current Debian packages) wrote that he would be more than happy if someone could support him maintaining these packages. And if you don't need the latest Docker binaries you will be probably fine if you just use them together with the Docker binaries provided by your Distro (and you get security updates via your package manager as well). However, there are a bunch of good reasons to prefer the current version of Docker. Which was most probably the motivation why the Docker people created a PPA and wrote that you should use it. But docker-compose is missing here. PS: I don't quite understand why issue 24210 was closed. I agree that there is tooling required first (so this issue here is a dependency for 24210) but this shouldn't be a reason to close this issue, right? |
How about both? 😛 --- For anyone looking to use this:
the Use this instead (requires #!/bin/sh
if [ -t 0 ]; then OPTS='-it'; fi
latest=$(curl -s https://registry.hub.docker.com/v2/repositories/docker/compose/tags/ | jq -r '.results[0].name')
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock \
-v "$(pwd):$(pwd)" -w "$(pwd)" \
$OPTS docker/compose:"$latest" ${1+"$@"} Note that this includes release candidate versions. The following script does not include prereleases, but fetches the release from GitHub instead of directly from the Docker Hub (so it's possible the tag won't exist on the Docker Hub): #!/bin/sh
if [ -t 0 ]; then OPTS='-it'; fi
latest=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | jq -r '.tag_name')
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock \
-v "$(pwd):$(pwd)" -w "$(pwd)" \
$OPTS docker/compose:"$latest" ${1+"$@"} This isn't ideal since there is no |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I would say let's close it since Docker team clearly isn't interested given that we don't hear from them for more than 3 years. Community cannot do anything because we don't control the repository. We have enough workaround above. |
This issue has been automatically marked as not stale anymore due to the recent activity. |
For reference, following the most recent suggestion from @sweepyoface in #2235 (comment) on my system at least, access to /var/run/docker.sock requires Without prefixing the docker-compose command with sudo...
Update: responding to @oxydaemon's comment below:
The information at https://docs.docker.com/install/linux/linux-postinstall/ shows how to manage access to docker through groups (instead of sudo). However note 'The docker group grants privileges equivalent to the root user' ( https://docs.docker.com/install/linux/linux-postinstall/ ) so until this is mitigated I'll personally keep using sudo. |
You shouldn't need sudo, that is permission denied error to docker.sock. username@myserver:~$ ls -l /var/run/docker.sock docker group members have read and write permissions |
The alternative https://docs.docker.com/compose/install/ under 'Alternative Install Options' is even simpler, and doesn't rely on python3-venv either...
Unfortunately 'Alternative Install Options' is set against tabs for 'Windows, Mac OS, Linux'. The Linux tab contains only curl-based instructions, (which swing free from software repositories or updates). I'd personally like to see 'install Pip' then 'pip install docker-compose' under the Linux tab. However, perhaps hiding the pip approach as an 'Alternative Install' is to avoid having to provide multi-os guidance how to install pip. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Unstale this. |
This issue has been automatically marked as not stale anymore due to the recent activity. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Unstale this, again 🙄. |
This issue has been automatically marked as not stale anymore due to the recent activity. |
Well, it looks like the move to bundling compose in the main |
That is encouraging, but do we know yet if there are plans to include this on Linux by default after this gets past the preview? It appears to be included in edge releases for Windows and Mac, but not Linux. If you want to install it currently, you have to run a shell script. |
is connected to #8011 |
Yes! Let's close this (additional documentation changes still to follow) |
Not everyone likes to install binaries (#1288).
It might be good to provide a system package for compose. We should use https://github.com/spotify/dh-virtualenv for the debian package and look into a similar approach for the rpm.
The text was updated successfully, but these errors were encountered: