Skip to content
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

Discard "docker-compose" in favor of "docker compose" #222

Closed
sincerelysaucy opened this issue Mar 1, 2024 · 9 comments · Fixed by #301
Closed

Discard "docker-compose" in favor of "docker compose" #222

sincerelysaucy opened this issue Mar 1, 2024 · 9 comments · Fixed by #301

Comments

@sincerelysaucy
Copy link

The published "docker-compose" binary is obsolete and unmaintained, and the "docker compose" plugin is actively being supported and built into contemporary releases of docker. Please discard the use of "docker-compose" or at least check for and use "docker compose" first in the bitwarden.sh, run.sh, and run.ps1 files. Its use encourages separately installing and relying on obsolete software, which should not be welcomed for security related software.

@Greenderella
Copy link
Member

Hi there,

This report has been escalated for further investigation. If you have more information that can help us, please add it below.

Thanks!

@vinnyperella
Copy link

The above issue, #232, is unrelated to this issue.

My instance is successfully using the 'docker compose' binary located in $HOME/.docker/cli-plugins

bitwarden@bitwarden:/opt/bitwarden$ which docker-compose
bitwarden@bitwarden:/opt/bitwarden$ docker compose version
Docker Compose version v2.26.1
bitwarden@bitwarden:/opt/bitwarden$ ~/.docker/cli-plugins/docker-compose version
Docker Compose version v2.26.1
bitwarden@bitwarden:/opt/bitwarden$ ./bitwarden.sh updateself
 _     _ _                         _            
| |__ (_) |___      ____ _ _ __ __| | ___ _ __  
| '_ \| | __\ \ /\ / / _` | '__/ _` |/ _ \ '_ \ 
| |_) | | |_ \ V  V / (_| | | | (_| |  __/ | | |
|_.__/|_|\__| \_/\_/ \__,_|_|  \__,_|\___|_| |_|

Open source password management solutions
Copyright 2015-2024, 8bit Solutions LLC
https://bitwarden.com, https://github.com/bitwarden

===================================================

bitwarden.sh version 2024.3.0
Docker version 26.0.0, build 2ae903e
Docker Compose version v2.26.1 <=============== latest Docker Compose release from Github

Updated self.
bitwarden@bitwarden:/opt/bitwarden$

I manually update this file using the Docker Compose Github releases page https://github.com/docker/compose/releases.

I do not have the binary that comes with the apt package docker-compose-plugin in my system path so it's not being used.

bitwarden@bitwarden:~$ dpkg -L docker-compose-plugin
/.
/usr
/usr/libexec
/usr/libexec/docker
/usr/libexec/docker/cli-plugins
/usr/libexec/docker/cli-plugins/docker-compose
/usr/share
/usr/share/doc
/usr/share/doc/docker-compose-plugin
/usr/share/doc/docker-compose-plugin/changelog.Debian.gz
bitwarden@bitwarden:~$ /usr/libexec/docker/cli-plugins/docker-compose version
Docker Compose version v2.25.0
bitwarden@bitwarden:~$

@sincerelysaucy
Copy link
Author

The #232 actually is related. If you manually install "docker-compose", the "bitwarden.sh" script is written to use it by preference. And it's obsolete and unsupported, and should no longer even be attempted in place of the better supported "docker compose" command.

@fuglphoenix
Copy link

fuglphoenix commented Sep 18, 2024

just adding my experience/pain regarding the use of docker-compose in the bitwarden.sh script 😅
my ubuntu installation contained the snap version of docker-compose. which messed up the bitwarden.sh start command. it would just error out and say something like

docker-compose.yml file doesn't exists. 
stat /opt/bitwarden/bwdata/docker/docker-compose.yml

even though it actually does exists.
it turns out the env var COMPOSE_FILE didn't work correctly when using docker-compose.
the fix was to remove docker-compose

@nkadel
Copy link

nkadel commented Sep 18, 2024

Do you need a pull request for this? Because the old 'docker-compose' binary is now six months older.

@danieled-it
Copy link

danieled-it commented Nov 21, 2024

Folks, for your information this just broke support for Synology NAS, where we're stuck with Synology's "Container Manager", it comes with

bitwarden@DiskStation:/volume1/docker$ docker version
Client:
 Version:           20.10.23
 API version:       1.41
 Go version:        go1.19.1
 Git commit:        876964a
 Built:             Fri Sep  8 08:19:48 2023
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server:
 Engine:
  Version:          20.10.23
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.19.1
  Git commit:       5fcb1cf
  Built:            Fri Sep  8 08:18:18 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.6.15
  GitCommit:        b23a389d8c181697302d163356e97dec04eb8d88
 runc:
  Version:          v1.1.4
  GitCommit:        5af893d
 docker-init:
  Version:          0.19.0
  GitCommit:        ed96d00
bitwarden@DiskStation:/volume1/docker$

and does not like docker compose:

docker: 'compose' is not a docker command.
See 'docker --help'

@nkadel
Copy link

nkadel commented Nov 21, 2024

Synology's version of docker is apparently obsolete. See:

  https://docs.docker.com/compose/releases/migrate/

If we still need to support 'docker-compose' for cases like yours, then the old order of operations should be reversed and 'docker composee' should be checked for first. Would you care to test that?

@nkadel
Copy link

nkadel commented Nov 21, 2024

Others have noticed the EOL docker on Synology, see:

 https://mariushosting.com/synology-docker-engine-eol/

@danieled-it
Copy link

Synology's version of docker is apparently obsolete. See:

  https://docs.docker.com/compose/releases/migrate/

If we still need to support 'docker-compose' for cases like yours, then the old order of operations should be reversed and 'docker composee' should be checked for first. Would you care to test that?

I see this is been taken care in #309 , really appreciate how responsive you folks are. Happy to test it on my Synology DS218+.

On top of that, I've checked and figured that in "Beta packages" in my Synology Package Center (this option has to be enabled in Package Center' settings), they brought Container Manager version 24.0.2-1525.

With that, version got bumped but still no compose, so the PR really helps there:

bitwarden@DiskStation:~$ docker version
Client:
 Version:           24.0.2
 API version:       1.43
 Go version:        go1.20.4
 Git commit:        610b8d0
 Built:             Thu Aug  1 07:07:08 2024
 OS/Arch:           linux/amd64
 Context:           default

Server:
 Engine:
  Version:          24.0.2
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.4
  Git commit:       b5710a2
  Built:            Thu Aug  1 07:07:31 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.7.1
  GitCommit:        067f5021280b8de2059026fb5c43c4adb0f3f244
 runc:
  Version:          v1.1.7
  GitCommit:        adc1b13
 docker-init:
  Version:          0.19.0
  GitCommit:        ed96d00
bitwarden@DiskStation:~$ docker compose version
docker: 'compose' is not a docker command.
See 'docker --help'
bitwarden@DiskStation:~$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants