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

Kompose doesn't work with docker-compose v3.7 #1152

Closed
dexterarun opened this issue Jul 1, 2019 · 26 comments · Fixed by #1213, #1334 or #1547
Closed

Kompose doesn't work with docker-compose v3.7 #1152

dexterarun opened this issue Jul 1, 2019 · 26 comments · Fixed by #1213, #1334 or #1547
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@dexterarun
Copy link

dexterarun commented Jul 1, 2019

When I try to convert a docker-compose file v3.7 to the various files required by kubernetes using Kompose v1.18.0 , I get the message: Version 3.7 of Docker Compose is not supported. Please use version 1, 2 or 3. Isn't it time yet to update the supported versions?

@hangyan
Copy link
Contributor

hangyan commented Jul 9, 2019

Yes. Thanks for create this issue, i will create a PR to add this.

@hangyan hangyan self-assigned this Jul 9, 2019
@hangyan hangyan added the kind/feature Categorizes issue or PR as related to a new feature. label Jul 9, 2019
@KhojiZoda
Copy link

Hello, saw your issue today, I was just wondering if the 3.7 version is not supported, is the 3.6 version supported?

@hangyan
Copy link
Contributor

hangyan commented Jul 12, 2019

wired. I have check the source code and both 3.6 and 3.7 is supported, can you try the master build?

@KhojiZoda
Copy link

What version of kompose do you have?

@crazyberry7
Copy link

Same issue. "Version 3.7 of Docker Compose is not supported. Please use version 1, 2 or 3"

@jdarling
Copy link

jdarling commented Aug 21, 2019

Get the same thing with 1.17.0

./kompose version
1.17.0 (a74acad)

./kompose convert
FATA Version 3.7 of Docker Compose is not supported. Please use version 1, 2 or 3 

If I change the version in the docker-compose.yml file to '3' instead of '3.7' everything works fine, so it's "supported" but doesn't want to be validated LOL

Installed Kompose using the directions from the kompose.io page:

# Linux
curl -L https://github.com/kubernetes/kompose/releases/download/v1.17.0/kompose-linux-amd64 -o kompose

# macOS
curl -L https://github.com/kubernetes/kompose/releases/download/v1.17.0/kompose-darwin-amd64 -o kompose

chmod +x kompose
sudo mv ./kompose /usr/local/bin/kompose

Tried with 1.18.0 as well, same thing:

./kompose version
1.18.0 (06a2e56)

./kompose convert
FATA Version 3.7 of Docker Compose is not supported. Please use version 1, 2 or 3 

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 19, 2019
@ryuzakace
Copy link

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 4, 2019
@pmespresso
Copy link

pmespresso commented Dec 11, 2019

bump? I'm able to kompose convert without any trouble but kompose up says

Error while deploying application: k.Transform failed: image key required within build parameters in order to build and push service

The image key is populated already from the kompose convert command from what I can see. I've also tried setting it to the remote endpoint where it is hosted (on Google Container Registry) to the same result.

My docker-compose looks more or less like:

version: '3.7'
services:
  main:
    build: ./
  postgres:
    image: postgres:12.1
    restart: always
    ports:
      - '5432:5432'
    environment:
      POSTGRES_USER: ...
      POSTGRES_PASSWORD: ...
    volumes:
      - postgres:/var/lib/postgresql/data
  prisma:
    image: prismagraphql/prisma:1.34
    restart: always
    ports:
      - '4466:4466'
    environment:
      PRISMA_CONFIG: |
        port: 4466
        databases:
          default:
            connector: postgres
            host: postgres
            user: ...
            password: ...
            rawAccess: true
            port: 5432
            migrations: true
volumes:
  postgres: ~

and the main-deployment.yaml:

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  annotations:
    kompose.cmd: kompose convert
    kompose.version: 1.19.0 ()
  creationTimestamp: null
  labels:
    io.kompose.service: main
  name: main
spec:
  replicas: 1
  strategy: {}
  template:
    metadata:
      annotations:
        kompose.cmd: kompose convert
        kompose.version: 1.19.0 ()
      creationTimestamp: null
      labels:
        io.kompose.service: main
    spec:
      containers:
      - image: main
        name: main
        resources: {}
      restartPolicy: Always
status: {}

@alechp
Copy link

alechp commented Dec 31, 2019

@yjkimjunior #969 has a partial solution

TLDR: Add image key to your prisma service

Before including image key
Screen Shot 2019-12-31 at 10 57 15 AM

After including image key
image

Screen Shot 2019-12-31 at 11 05 39 AM

@hangyan
Copy link
Contributor

hangyan commented Jan 1, 2020

@alechp Thanks for the explanation, i have merged PR #1213 to solve this empty image key issue, it will be included in the 1.21.0 release.

@pmespresso
Copy link

@alechp thanks! I decided to just write my kubernetes config files manually for current project but hopefully will revisit kompose in the near future.

@moluzhui
Copy link

@hangyan The kompose conver command failed to execute. The output is similar to the following

# docker-compose config > docker-compose-resolved.yaml
# kompose convert -f docker-compose-resolved.yaml
FATA Version 2.4 of Docker Compose is not supported. Please use version 1, 2 or 3

Official documentation says restrictions support 2.1 and 3.2, why is 2.4 not supported?

@lebadapetru
Copy link

lebadapetru commented Sep 13, 2020

I have kompose version 1.21.0 (992df58) on win 10 pro and i still receive: ?[31mFATA?[0m Version 3.8 of Docker Compose is not supported. Please use version 1, 2 or 3

If i change the version to 3 i get: ?[31mFATA?[0m services.php.build Additional property target is not allowed

Any updates on this?

@hangyan
Copy link
Contributor

hangyan commented Sep 15, 2020

@lebadapetru minor version of 1 2 is not supported, docker-compose 3 is supported to version 3.7

@hangyan hangyan reopened this Sep 15, 2020
@hangyan hangyan closed this as completed Sep 18, 2020
@kachar
Copy link

kachar commented Oct 23, 2020

@hangyan Issue seems to be still ongoing with the latest release tag 1.21 from 25 Feb 2020

$ kompose version
1.21.0 (992df58d8)

With docker-compose.yaml version 3.8

version: "3.8"
services:
...

Do you plan a new release with the adoption with granular versions like 3.8?

Any workaround is also welcome

@atkuzmanov
Copy link

Hi @hangyan ,

I just tried the Kompose master build v1.22.0 and I can confirm that it is working for Docker-Compose v3.8.
Thanks for the great work!

@kachar, it should work for you now, unless you have some healthcheck or other deprecated specifics in depends_on, please see:
https://stackoverflow.com/questions/47710767/what-is-the-alternative-to-condition-form-of-depends-on-in-docker-compose-versio

Cheers,
atkuzmanov

@rodney-b
Copy link

I'm still having this issue with the latest Kompose Linux release version v1.22.0 (955b781). If I try to kompose convert with the version in my docker compose yaml set to "3.8" I get:

FATA Version 3.8 of Docker Compose is not supported. Please use version 1, 2 or 3

@hangyan
Copy link
Contributor

hangyan commented Dec 28, 2020

@rodney-b I think it's may be in the master build, you can try it or wait for the next release

@mooreInteractive
Copy link

I had "3.9" just changed to "3" and convert worked. Not sure the implication, but seems to have worked.

@manatax
Copy link

manatax commented Sep 23, 2021

Getting it on 3.9 with version 1.24.0

@ons-cherif
Copy link

UPDATES in 2022: It doesn't work for me with 3.9, but it works fine with 3.6 and 3.7.

@boturkin
Copy link

boturkin commented Dec 8, 2022

I have version 1.27.0 (b0ed6a2). It doesn't work with 3.9

@SteversIO
Copy link

SteversIO commented Dec 17, 2022

Tags property is not supported in kompose either.

FATA services.api.build Additional property tags is not allowed 

@cdrage
Copy link
Member

cdrage commented Dec 18, 2022

Honestly we need to update Kompose to take any file that's above version 3.

Especially because the Compose spec has removed the version key.

We'll push a new PR soon!

@SterlingMcKinley
Copy link

kompose convert worked for me after changing the version of my docker-compose.yml file to "3".

Once I did that kompose convert worked with no issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet