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

"WARN docker-compose.yml: version is obsolete" when starting or stopping bitwarden #232

Closed
vinnyperella opened this issue Mar 19, 2024 · 5 comments · Fixed by bitwarden/server#3972
Assignees

Comments

@vinnyperella
Copy link

This is low priority as it doesn't appear to cause any issues and is just a WARN but it might confuse people and make them think there's an issue. I updated my docker compose to v2.25.0 which is the latest version and when I ran "./bitwarden.sh stop" or "./bitwarden.sh start" I received the following warning.

WARN[0000] /opt/bitwarden/bwdata/docker/docker-compose.yml: version is obsolete

bitwarden@bitwarden:/opt/bitwarden$ ./bitwarden.sh stop
 _     _ _                         _            
| |__ (_) |___      ____ _ _ __ __| | ___ _ __  
| '_ \| | __\ \ /\ / / _` | '__/ _` |/ _ \ '_ \ 
| |_) | | |_ \ V  V / (_| | | | (_| |  __/ | | |
|_.__/|_|\__| \_/\_/ \__,_|_|  \__,_|\___|_| |_|

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

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

bitwarden.sh version 2024.2.3
Docker version 25.0.4, build 1a576c5
Docker Compose version v2.25.0

WARN[0000] /opt/bitwarden/bwdata/docker/docker-compose.yml: `version` is obsolete 
WARN[0000] /opt/bitwarden/bwdata/docker/docker-compose.yml: `version` is obsolete 
[+] Running 13/13
 ✔ Container bitwarden-attachments    Removed                                                                                                                                                                   1.2s 
 ✔ Container bitwarden-nginx          Removed                                                                                                                                                                   0.8s 
 ✔ Container bitwarden-icons          Removed                                                                                                                                                                   2.2s 
 ✔ Container bitwarden-sso            Removed                                                                                                                                                                   1.7s 
 ✔ Container bitwarden-events         Removed                                                                                                                                                                   2.1s 
 ✔ Container bitwarden-notifications  Removed                                                                                                                                                                   2.4s 
 ✔ Container bitwarden-api            Removed                                                                                                                                                                   1.8s 
 ✔ Container bitwarden-identity       Removed                                                                                                                                                                   2.1s 
 ✔ Container bitwarden-web            Removed                                                                                                                                                                   1.8s 
 ✔ Container bitwarden-admin          Removed                                                                                                                                                                   2.0s 
 ✔ Container bitwarden-mssql          Removed                                                                                                                                                                   0.8s 
 ✔ Network docker_default             Removed                                                                                                                                                                   0.2s 
 ✔ Network docker_public              Removed                                                                                                                                                                   0.1s 
bitwarden@bitwarden:/opt/bitwarden$

One of the changes in docker compose v2.25.0 is to bump compose-go to v2.0.0.

https://github.com/docker/compose/releases
docker/compose#11623

And one of the changes for compose-go v2.0.0 is to "warn user version is obsolete".

https://github.com/compose-spec/compose-go/releases/tag/v2.0.0
compose-spec/compose-go#575

From the above pull request.

Since compose-specification was released, version attribute is obsolete as it doesn't guarantee any form of compatibility. While users adopted new features introduced in the spec, we still see many of them using version: "3" in compose files.

This adds a warning to encourage users to stop using this useless attirbute

bitwarden@bitwarden:/opt/bitwarden$ grep -i version bwdata/docker/docker-compose.yml 
version: '3'
bitwarden@bitwarden:/opt/bitwarden$
@Greenderella
Copy link
Member

Hi there!

Thank you for your report, it seems like it is a duplicate of this one #222

If you wish to add any further information/screenshots/recordings etc., please feel free to do so at any time in there - our engineering team will be happy to review these.

This issue will now be closed.

Thanks!

@vinnyperella
Copy link
Author

Hi there!

Thank you for your report, it seems like it is a duplicate of this one #222

If you wish to add any further information/screenshots/recordings etc., please feel free to do so at any time in there - our engineering team will be happy to review these.

This issue will now be closed.

Thanks!

This is not a duplicate of #222 this is a completely different issue. It's complaining about the "version: '3'" parameter inside the docker-compose.yml file that's used to start Bitwarden. In the latest version of the docker compose binary the version parameter is deprecated.

@GrahamTolhurst
Copy link

I have to agree with @vinnyperella, this issue is not related to #222
I've manually commented out the version line in docker-compose.yml, and the warning is no longer given when starting bitwarden. It appears the current docker-compose.yml is not fully compatible with the latest docker compose version. Removing the version line makes it compatible.

@vinnyperella
Copy link
Author

@Greenderella could you please reopen this issue? It's not a high priority since it's just a warning but as I mentioned in my initial issue post it could cause some concern for people running Bitwarden self-hosted that are not aware of the reason for the warning. The solution should be to remove the version parameter from docker-compose.yml as @GrahamTolhurst mentioned the parameter is obsolete anyway.

@Greenderella
Copy link
Member

Sorry, I misinterpreted the issue. This has been escalated for further investigation. If you have more information that can help us, please add it below.

Regards

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.

4 participants