Git Product home page Git Product logo

Comments (21)

SynVisions avatar SynVisions commented on July 30, 2024 3

I was able to fix the issue by installing the latest docker-compose and deleting the old one (which was not installed via apt). So one bug seems to be that the documentation here says that these are the requirements:

Minimum Recommended
Engine 19+ and Compose 1.24+ Engine 19+ and Compose 1.24+

As the output in the original issue report shows, I was previously running Docker Engine 24.0.5 and Compose 1.24.1. I think updating the documentation is prudent, but it would also be nice I think to fail the upgrade with a precondition check on the docker-compose version, as this upgrade broke my bitwarden installation.

from server.

tobiasbaehr avatar tobiasbaehr commented on July 30, 2024 3

Had the same problem. Just delete old docker-compose binary.

The bitwarden.sh script use the old docker-compose by default.

if command -v docker-compose &> /dev/null
then
    dccmd='docker-compose'
else
    dccmd='docker compose'
fi

from server.

LufoX11 avatar LufoX11 commented on July 30, 2024 3

Ubuntu 18.04 here. Solution for me was a mix of everything.

  1. First I upgraded docker via PPA:
~# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
~# add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
~# apt update
~# apt-cache policy docker-ce
~# apt install docker-ce -y

Check docker is properly running with systemctl status docker.

  1. Install docker-compose-plugin and remove docker-compose. docker-compose-plugin is the replacement for docker-compose binary so, from now on, ./docker-compose will be invoked as docker compose:
~# apt remove docker-compose
~# apt install docker-compose-plugin
  1. (you may not need this). After running sudo -u bitwarden /opt/bitwarden/bwdata/scripts/updatebw.sh, it failed with
error getting credentials - err: exit status 1, out: `Cannot autolaunch D-Bus without X11 $DISPLAY`

So I had to delete golang-docker-credential-helpers:

~# apt remove golang-docker-credential-helpers

Then I run the update script again and all came back to normal. As mentioned by @tobiasbaehr the start script will try docker compose (which is the new way to do it) if docker-compose is not available, so it's crucial to remove the old package.

from server.

SynVisions avatar SynVisions commented on July 30, 2024 2

I was able to fix the issue by installing the latest docker-compose and deleting the old one (which was not installed via apt).

@SynVisions Would you mind sharing the steps you took to updating your docker-compose, please?

First I followed the steps here (you may need to use different steps depending upon your OS and distro): https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository

This did not fully solve the problem because as @tobiasbaehr calls out, the shell script looks for the existence of docker-compose (which is the old version) first. I don't remember how that was installed originally, but I simply did a sudo rm /usr/local/bin/docker-compose (path where it was in my case) and re-ran ./bitwarden.sh start and it then started using the new version of docker compose.

from server.

spencer2785 avatar spencer2785 commented on July 30, 2024 2

This did not fully solve the problem because as @tobiasbaehr calls out, the shell script looks for the existence of docker-compose (which is the old version) first. I don't remember how that was installed originally, but I simply did a sudo rm /usr/local/bin/docker-compose (path where it was in my case) and re-ran ./bitwarden.sh start and it then started using the new version of docker compose.

I needed to use ./bitwarden.sh rebuild after deleting docker-compose an then start ./bitwarden.sh start.
It would be nice if the script checks that the requirement for docker-compose are right before starting with an error.

from server.

Ayitaka avatar Ayitaka commented on July 30, 2024

@djsmith85 please note this is NOT a duplicate of #4059 and should not be closed as such the way #4067 and #4068 were incorrectly closed.

This error is due to many systems not updating to the latest composer version via normal update channels (apt) and so they still default to version: "1", which obviously lacks some of the config options used in later versions (e.g. 3).

from server.

Ayitaka avatar Ayitaka commented on July 30, 2024

I was able to fix the issue by installing the latest docker-compose and deleting the old one (which was not installed via apt).

@SynVisions Would you mind sharing the steps you took to updating your docker-compose, please?

from server.

tferic avatar tferic commented on July 30, 2024

Ran into the same issue. Deleting docker-compose manually fixed the issue. Thanks.
The Bitwarden software really should be changed to default to docker compose nowadays.

from server.

Greenderella avatar Greenderella commented on July 30, 2024

The 2024.5.0 image of the setup container now contains a fix for this issue. Please make sure you are running the latest version of Docker and update Bitwarden again to apply the fix.

Thank you for everybody's patience.

from server.

zatmania avatar zatmania commented on July 30, 2024

Hi,
i try to update bitwarden on Linux with 2024.5.0, same problem.
I have update my system before to have latest version of docker.

and then with ./bitwarden.sh update, i got this error :

ERROR: The Compose file '/opt/bitwarden/bwdata/docker/docker-compose.yml' is invalid because:
Unsupported config option for services: 'nginx'
Unsupported config option for networks: 'public'
ERROR: The Compose file '/opt/bitwarden/bwdata/docker/docker-compose.yml' is invalid because:
Unsupported config option for services: 'notifications'
Unsupported config option for networks: 'public'

from server.

MatthieuBarthel avatar MatthieuBarthel commented on July 30, 2024

@zatmania I got a similar issue, you need to remove the old docker-compose command (which docker-compose and remote it), and install the new compose plugin if you don't already have it (docker compose version to check)

from server.

zatmania avatar zatmania commented on July 30, 2024

@MatthieuBarthel
I have already do this, but no success

from server.

Ayitaka avatar Ayitaka commented on July 30, 2024

@MatthieuBarthel I have already do this, but no success

Check your docker-compose.yml and make sure there are no duplicate services entries (i.e. mssql, web, attachments, api, identity, nginx, etc). Next, if you have one, check your docker-compose.override.yml for the same thing and remove any duplicate service entries.

from server.

enoch85 avatar enoch85 commented on July 30, 2024

Just if someone comes here using Alpine:

  1. apk del docker-compose
  2. apk add docker-cli-compose

from server.

zatmania avatar zatmania commented on July 30, 2024

Well, update works but as said @MatthieuBarthel , i need to remove docker-compose by hand :

rm -f /usr/local/bin/docker-compose

and then run ./bitwarden.sh updateself and then ./bitwarden.sh update

from server.

gpi-ct avatar gpi-ct commented on July 30, 2024

rm -f /usr/local/bin/docker-compose
and then run ./bitwarden.sh updateself and then ./bitwarden.sh update

+1 on that working for me as well. Thank goodness for VM snapshots.. I tried it again with chmod 000, in case I needed it back, but that failed as well.
Ended up moving it out of the way and that worked:
mv /usr/local/bin/docker-compose /usr/local/bin/docker-compose.disabled
The update looked weird as it ran, like formating on the screen. Still worked. I had tried adding "version: '3'" to the top of docker-compose.yml but it gets generated automatically.
Just noticed I'm still on Ubuntu 18.04 so I need to get that updated as well.

from server.

thedxt avatar thedxt commented on July 30, 2024

most of what @LufoX11 is what I needed to do.

I'm on Debian 11.

I needed to reinstall the docker engine and used the official method listed here then I needed to apt remove docker-compose then apt install docker-compose-plugin

after that ./bitwarden.sh update worked

from server.

gpi-ct avatar gpi-ct commented on July 30, 2024

Thank you, can confirm this worked for me as well. I'm on Ubuntu so one extra step was needed:
Modified when writing out to /etc/apt/sources.list.d/docker.list, changed 'debian' to 'ubuntu'

from server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.