Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

when using docker compose 3.8 getting 'version is unsupported' error

I'm trying to use the latest docker compose version 3.8 but I keep getting "Version in ".\docker-compose.yml" is unsupported." error.

I'm using the latest version of Docker engine, 19.03.8 and Docker desktop, 2.2.0.5.

EDIT: Here is my docker compose version: docker-compose version 1.25.4, build 8d51620a

Here is my docker compose file:

version: "3.8"
services:
  portal:
    image: portal-dev
    ports:
      - "5000:80"
      - "4200:4200"
    container_name: portal
    build:
      context: .
      dockerfile: Dockerfile.dev
    environment:
      ASPNETCORE_ENVIRONMENT: Development
      DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER: 0

My docker compose file works using version 3.7. I can't figure out why it doesn't work using version 3.8. Can anyone help?

like image 906
mdailey77 Avatar asked Apr 21 '20 13:04

mdailey77


People also ask

How do I fix docker compose yml is unsupported?

How to fix: Version in "./docker-compose. yml" is unsupported. You can fix this issue by upgrading docker-compose to the newest version (just download the new script from the install section). Make sure you uninstall the any previous apt package before coping the script via curl sudo apt remove docker-compose .

How do I get the docker compose version?

It's on your docker-compose. yml file. First parameter is Docker Compose version. Docker Compose version file 3 was introduced in release 1.10.


1 Answers

The 3.8 compose version was added in docker-compose 1.25.5 (ref: https://github.com/docker/compose/releases/tag/1.25.5 )

Docker Desktop 2.3 include the new version of compose but it's on the edge channel for now.

If you can/doesn't want to use the Edge Channel, you can download the latest version of docker-compose manually on the github release page https://github.com/docker/compose/releases

like image 116
jmaitrehenry Avatar answered Sep 17 '22 14:09

jmaitrehenry