-
Notifications
You must be signed in to change notification settings - Fork 14
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
"docker-compose" and "docker compose" #168
Comments
We use static binaries published by Docker to https://download.docker.com/linux/static/stable/x86_64/ Content of that package actually is very simple script nowadays so it can be easily improved if you figure out solution to this https://github.com/burmilla/os-services/blob/master/images/20-dockercompose/download.sh |
So maybe something like the following would work (based on this) as a function inside the shell script:
WDYT? Maybe a little overkill wrapping all |
Check documentation about Docker Plugins. There should be way without custom wrapper. |
Sorry, could provide a link? Thank you |
I think that it is called for "Docker CLI plugins". Haven't studied how they works exactly but check example docker/cli#1534 or https://github.com/docker/buildx Alternatively you can check from https://github.com/docker/docker-ce-packaging how they create Docker CE packages for different platforms. |
Got it, I thought you meant in the BurmillaOS docs. |
Btw, I understood that you are running BurmillaOS as virtual machine on MacOS? On that case you probably get better user experience by having Docker CLI directly on OSX. Look example https://blog.programster.org/use-remote-docker-host-with-ssh |
MacOS is just for experimenting, I sure have a Docker directly running, too. Ultimately I want to test BurmillaOS in an OpenStack. |
OK, thanks for the tip with the CLI plugins. Here is a working solution based on this:
Then
seems to work (just a symlink does not work). Very cool! |
@gramian copying /usr/bin/docker-compose to ~/.docker/cli-plugins is not the right way, because you copy the version 1 script to the location where the version 2 cli plugin should be. @olljanat it would be great if the The correct directory for the plugin is |
On 2.x versions of BurmillaOS, You can see logic in
Pull request to add support for |
But then this is still wrong, if you run |
Also this doesn't seem to be working in rc2: rancher@burmillaos-dev02:~$ sudo ros service list
disabled amazon-ecs-agent
disabled container-cron
disabled zfs
disabled kernel-extras
disabled kernel-headers
disabled kernel-headers-system-docker
enabled open-vm-tools
disabled hyperv-vm-tools
disabled qemu-guest-agent
disabled amazon-metadata
disabled volume-cifs
disabled volume-efs
disabled volume-nfs
disabled modem-manager
disabled waagent
enabled docker-compose
rancher@burmillaos-dev02:~$ docker-compose ps
INFO: System service "docker-compose" is not yet enabled
INFO[0000] Project [os]: Starting project
INFO[0000] [0/20] [docker-compose]: Starting
INFO[0000] Rebuilding docker-compose
INFO[0000] [1/20] [docker-compose]: Started
INFO[0000] Project [os]: Project started
rancher@burmillaos-dev02:~$ docker-compose ps
INFO: System service "docker-compose" is not yet enabled
INFO[0000] Project [os]: Starting project
INFO[0000] [0/20] [docker-compose]: Starting
INFO[0001] Rebuilding docker-compose
INFO[0001] [1/20] [docker-compose]: Started |
Nope. v1.9.x versions are using 1.x versions of docker-compose but as those are not supported anymore BurmillaOS 2.x must use 2.x versions of docker-compose. To make sure backward compatibility is responsibility of BurmillaOS to make sure that
That is most likely result of burmilla/os-services@5114838 where I started to implement cli plugin support but didn't had time to fully test/finalize it yet. |
It is now in way in v2.0.0 that running Not perfect but looks to be working and be improved by contributing to os-services repo without needs to release new version. |
@olljanat you sad:
which is not the case for new v2 installs (tested on a fresh install of v2.0.1). The $ sudo ros os version
v2.0.1
$ docker-compose version
INFO: System service "docker-compose" is not yet enabled
INFO[0000] Project [os]: Starting project
INFO[0000] [0/20] [docker-compose]: Starting
INFO[0000] Rebuilding docker-compose
INFO[0000] [1/20] [docker-compose]: Started
INFO[0000] Project [os]: Project started This is actually a difference to upgraded installations (upgraded v1.9.6 to v2.0.1) where the $ sudo ros os version
v2.0.1
$ docker-compose version
docker-compose version 1.29.2, build 5becea4c
docker-py version: 5.0.0
CPython version: 3.7.10
OpenSSL version: OpenSSL 1.1.0l 10 Sep 2019 |
That is true and that why this issue is open. Someone need to take action and update logic in https://github.com/burmilla/os-services/tree/v2.0.1/images/20-dockercompose so it gets fixed to all the existing and new installations. But as this low priority bug, I didn't wanted to delay v2.0.0 release more because of it. |
As fresh installation and upgraded installation behave differently, I would not call this a Also at least the release notes should mention this problem. |
You are of course allowed to disagree but I call it low priority bug because it does not prevent anyone from using BurmillaOS, docker-compose is not even part of core functionalities as it is extra service and because it is very easy to download docker-compose from internet. Annoying bug for sure but still low priority.
Version number changed from v1.9.x to v2.0.x to make it clear for everyone that there have been massive changes under the hood and that there might be bugs. Bugs is not something what you list in release notes. It is role of this issue tracker. PS. I would like to have this issue fixed longtime ago but unless more people who are ready contributing to code appears here I'm unfortunately forced to prioritize these things. |
I didn't follow this thread's discussion (sorry), but I use the following script to install the latest docker-compose & docker-buildx. - content: |+
#!/bin/sh
# https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c
get_latest_release() {
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
}
# install docker compose plugin (https://kazuhira-r.hatenablog.com/entry/2022/04/30/002702)
sudo mkdir -p /usr/local/lib/docker/cli-plugins
ver=$(get_latest_release docker/compose)
url=https://github.com/docker/compose/releases/download/$ver/docker-compose-linux-x86_64
echo "Downloading $url..."
sudo curl -SL $url -o /usr/local/lib/docker/cli-plugins/docker-compose
sudo chmod a+x /usr/local/lib/docker/cli-plugins/docker-compose
# support both "docker compose" and "docker-compose" for backward comatibility
sudo ln -sf /usr/local/lib/docker/cli-plugins/docker-compose /usr/local/bin/docker-compose
# install docker buildx
ver=$(get_latest_release docker/buildx)
url=https://github.com/docker/buildx/releases/download/$ver/buildx-$ver.linux-amd64
echo "Downloading $url..."
sudo curl -SL $url -o /usr/local/lib/docker/cli-plugins/docker-buildx
sudo chmod a+x /usr/local/lib/docker/cli-plugins/docker-buildx
owner: root
path: /etc/rc.install-docker-plugins
permissions: "0755" I feel docker-compose as a service container (from RancherOS) seems too tricky and harder to update, so I've not used that since a few years before. p.s. |
It was added because of request in #18 but I have been also thinking that it probably was bad idea. Docker compose have been updating too often. Personally I don't ever use |
I finally had time to look this. Added now small wrapper which redirects Can be tested on v2.0.2-rc2 |
BurmillaOS Version: v2.0.0-rc1
Where are you running BurmillaOS? Virtual Box
Which processor architecture you are using? Apple M2
Do you use some extra hardware? No
Which console you use? default
Do you use some service(s) which are not enabled by default? docker-compose
Have you installed some extra tools to console? No
Do you use some other customizations? No
Please share copy of your cloud-init. None
I enabled/downloaded "docker-compose" by running
docker-compose
. However, the meanwhile more commondocker compose
does not work, as it results in:docker: 'compose' is not a docker command
.Could an alias be added for
docker compose
(not an actualalias
due to the whitespace)?The text was updated successfully, but these errors were encountered: