Giter VIP home page Giter VIP logo

Comments (12)

martin-tk avatar martin-tk commented on April 27, 2024 2

I had this issue on Kubuntu 22.04.4 LTS.
For me it turned out that I had docker-compose-plugin installed. This seems to make spring boot use docker's compose subcommand instead of executing docker-compose command directly (which is generally ok, except in this case).
After uninstalling docker-compose-plugin and downloading docker-compose 2.26.0 my SpringBoot app is able to start and services defined in compose.yml start fine.

from spring-boot.

mhalbritter avatar mhalbritter commented on April 27, 2024 1

How did I overlook that in my search ?? Thanks Andy, i've closed my issue as a dupe. The PR is already merged, so we need to wait for the next docker compose release. Nothing we can do here.

If you're affected, the workaround is to not use Docker Compose 2.25.0. 2.24.0 works fine.

from spring-boot.

mhalbritter avatar mhalbritter commented on April 27, 2024 1

Docker Compose 2.26.0 has been released, which should fix that bug.

from spring-boot.

anthonydahanne avatar anthonydahanne commented on April 27, 2024 1

I confirm! I just tested it out, it is fixed!

from spring-boot.

anthonydahanne avatar anthonydahanne commented on April 27, 2024

well, it appears that docker-compose 2.25.0 changed a lot; in particular:

[Update](https://docs.docker.com/compose/release-notes/#update)

    Dependencies upgrade: bump compose-go v2.0.0

After reverting to previous docker-compose, version 2.24.7, using this trick and the file at https://raw.githubusercontent.com/Homebrew/homebrew-core/65be7dffbc1ff28f4435d7b39411c457b3a975fd/Formula/d/docker-compose.rb , it worked again.

Furthermore, I now have proper Json

 docker-compose --file docker-compose.yml --ansi never config --format=json
{
  "name": "dev-calendar",
  "networks": {
    "default": {
      "name": "dev-calendar_default"
    }
  },
  "services": {
    "database": {
      "environment": [
        "POSTGRES_USER=myuser",
        "POSTGRES_DB=mydatabase",
        "POSTGRES_PASSWORD=secret"
      ],
      "image": "postgres:15.2",
      "networks": {
        "default": null
      },
      "ports": [
        {
          "mode": "ingress",
          "protocol": "tcp",
          "published": "15432",
          "target": 5432
        }
      ]
    },
    "pgadmin": {
      "environment": {
        "PGADMIN_DEFAULT_EMAIL": "[email protected]",
        "PGADMIN_DEFAULT_PASSWORD": "secret"
      },
      "image": "dpage/pgadmin4",
      "networks": {
        "default": null
      },
      "ports": [
        {
          "mode": "ingress",
          "protocol": "tcp",
          "published": "8888",
          "target": 80
        }
      ]
    }
  }
}

from spring-boot.

mhalbritter avatar mhalbritter commented on April 27, 2024

Thanks for the report. We have to add support for docker compose 2.25.0.

from spring-boot.

mhalbritter avatar mhalbritter commented on April 27, 2024

Looks like a bug in Docker Compose. Let's see what the Docker Compose team says.

from spring-boot.

wilkinsona avatar wilkinsona commented on April 27, 2024

I saw someone else with this problem on Mastodon from where I learned that it should be fixed by this PR.

from spring-boot.

ENate avatar ENate commented on April 27, 2024

@anthonydahanne I have docker 26.0 but still facing this issue. Is that your docker version, too?

from spring-boot.

mhalbritter avatar mhalbritter commented on April 27, 2024

The docker version doesn't matter. Run docker compose version to see your Docker Compose version. If it says v2.25.0, you're still using the bugged version.

from spring-boot.

ENate avatar ENate commented on April 27, 2024

Thanks @mhalbritter - will check. It seems the v2.26.0 is not yet available on the Ubuntu apt package manager.

from spring-boot.

matterwin avatar matterwin commented on April 27, 2024

Yes installing docker-compose-linux-x86_64 on my Ubuntu worked solved my "Failed to parse docker JSON" problem for my Spring-Boot 3 application

from spring-boot.

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.