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

Add build key support for v3 of Docker Compose #636

Closed
cdrage opened this issue Jun 12, 2017 · 19 comments
Closed

Add build key support for v3 of Docker Compose #636

cdrage opened this issue Jun 12, 2017 · 19 comments
Assignees

Comments

@cdrage
Copy link
Member

cdrage commented Jun 12, 2017

This will have to be fixed upstream as the code here in docker/cli ignores build at the moment: https://github.com/docker/cli/blob/master/cli/compose/types/types.go#L9

This is a tracking issue as #600 has yet to be merged.

@surajssd
Copy link
Member

@cdrage #600 is merged!

@cdrage
Copy link
Member Author

cdrage commented Jun 14, 2017

@surajssd Yes, but this issue is for post-# #600 merge. V3 Build support does not work due to: https://github.com/docker/cli/blob/master/cli/compose/types/types.go#L9 (see ignored section), thus we don't map it in Kompose.

@surajnarwade
Copy link
Contributor

@surajssd @cdrage , as build is still unsupported in https://github.com/docker/cli/blob/master/cli/compose/types/types.go#L9 , shall we use it from v1v2.go for v3.go ?
does it make sense ? if yes I am up for this :)

@cdrage
Copy link
Member Author

cdrage commented Jun 20, 2017

@surajnarwade
Yes, we are indeed going to be re-using the code from v1v2.go in v3.go but that's the easy part, the problem is parsing v3 correctly so we can actually retrieve the information.

This would have to be fixed upstream unfortunately, or we can find a work-around to retrieve the keys.

@cdrage
Copy link
Member Author

cdrage commented Jun 20, 2017

When the time comes, we will move the build conversion code to a separate file (compose.go maybe where the other functions are? So both v1v2.go and v3.go can use it.

If you can find a way to retrieve the build key that'd be great! 👍 💯 👍 (we don't need to figure out the build key conversion, we already figured that part out 😄 )

@surajnarwade
Copy link
Contributor

thanks , @cdrage I will give it a try :)

@cdrage cdrage added this to the 1.1.0 release milestone Aug 16, 2017
@cdrage
Copy link
Member Author

cdrage commented Aug 16, 2017

I think we should set this as high-priority so we can add build support for Compose V3 as that is the only thing that is missing between v1v2 and v3.. Unfortunately it's due to the key being missing from https://github.com/docker/cli/blob/master/cli/compose/types/types.go#L9 so we can use it to parse Docker Compose.

@cdrage
Copy link
Member Author

cdrage commented Aug 29, 2017

PR pushed here: docker/cli#481

@cdrage cdrage modified the milestones: 1.1.0 release, 1.2.0 release Aug 30, 2017
@cdrage cdrage modified the milestones: 1.3.0 release, 1.4.0 release Oct 10, 2017
@surajnarwade surajnarwade self-assigned this Oct 11, 2017
surajnarwade added a commit to surajnarwade/kompose that referenced this issue Oct 11, 2017
@coli
Copy link

coli commented Oct 11, 2017

Looks like it doesn't support just a string for build.

  • 'Build' expected a map, got 'string'

@surajnarwade
Copy link
Contributor

@coli , yeah :(
need to fix that in docker/cli

@surajnarwade
Copy link
Contributor

@coli , that problem will resolve after docker/libcompose#498 gets merged and again vendoring for libcompose and docker/cli

surajnarwade added a commit to surajnarwade/kompose that referenced this issue Oct 12, 2017
Resolves kubernetes#636

This PR will add support for `build` in docker compose v3.
As docker/cli#481 got merged now
@cdrage
Copy link
Member Author

cdrage commented Oct 12, 2017

@surajnarwade No idea why you're referencing docker/libcompose. Docker Compose V3 support within Kompose is using docker/cli

Your PR is here: #846 for Version 3 implementation.

@coli are you using Version 2 or Version 3 in your Docker Compose YAML file?

If you're using Version 2, this is a separate issue as Version 3 is yet to be supported.

@surajnarwade
Copy link
Contributor

surajnarwade commented Oct 12, 2017

@cdrage , @coli is getting issue for v3, to solve this, I need to update Docker CLI vendor and then libcompose to solve logrus issues as well as build context issue

@coli
Copy link

coli commented Oct 12, 2017

I'm on v3.

@cdrage
Copy link
Member Author

cdrage commented Oct 12, 2017

Okay, so your statement about libcompose was unrelated.. The problem will not be resolved after docker/libcompose#498 is merged in. It will be resolved after #846

@surajnarwade
Copy link
Contributor

@cdrage to merge #846 , I need to update vendor for docker/cli upon which kompose is breaking due to logrus stuff

surajnarwade added a commit to surajnarwade/kompose that referenced this issue Oct 25, 2017
Resolves kubernetes#636

This PR will add support for `build` in docker compose v3.
As docker/cli#481 got merged now
surajnarwade added a commit to surajnarwade/kompose that referenced this issue Oct 25, 2017
To resolve build context issue as mentioned in kubernetes#636
This PR will update vendor for `libcompose` and `docker/cli` and fix small issues from
`pkg/loader/compose/v3.go` which are occuring due to new changes in `docker/cli`
surajnarwade added a commit to surajnarwade/kompose that referenced this issue Oct 25, 2017
To resolve build context issue as mentioned in kubernetes#636
This PR will update vendor for `libcompose` and `docker/cli` and fix small issues from
`pkg/loader/compose/v3.go` which are occuring due to new changes in `docker/cli`
@cdrage cdrage modified the milestones: 1.4.0 release, 1.5.0 release Oct 31, 2017
surajnarwade added a commit to surajnarwade/kompose that referenced this issue Nov 20, 2017
To resolve build context issue as mentioned in kubernetes#636
This PR will update vendor for `libcompose` and `docker/cli` and fix small issues from
`pkg/loader/compose/v3.go` which are occuring due to new changes in `docker/cli`
surajnarwade added a commit to surajnarwade/kompose that referenced this issue Nov 20, 2017
To resolve build context issue as mentioned in kubernetes#636
This PR will update vendor for `libcompose` and `docker/cli` and fix small issues from
`pkg/loader/compose/v3.go` which are occuring due to new changes in `docker/cli`
surajnarwade added a commit to surajnarwade/kompose that referenced this issue Nov 20, 2017
To resolve build context issue as mentioned in kubernetes#636
This PR will update vendor for `libcompose` and `docker/cli` and fix small issues from
`pkg/loader/compose/v3.go` which are occuring due to new changes in `docker/cli`
surajnarwade added a commit to surajnarwade/kompose that referenced this issue Nov 20, 2017
To resolve build context issue as mentioned in kubernetes#636
This PR will update vendor for `libcompose` and `docker/cli` and fix small issues from
`pkg/loader/compose/v3.go` which are occuring due to new changes in `docker/cli`
surajnarwade added a commit to surajnarwade/kompose that referenced this issue Nov 21, 2017
To resolve build context issue as mentioned in kubernetes#636
This PR will update vendor for `libcompose` and `docker/cli` and fix small issues from
`pkg/loader/compose/v3.go` which are occuring due to new changes in `docker/cli`
surajnarwade added a commit to surajnarwade/kompose that referenced this issue Nov 21, 2017
To resolve build context issue as mentioned in kubernetes#636
This PR will update vendor for `libcompose` and `docker/cli` and fix small issues from
`pkg/loader/compose/v3.go` which are occuring due to new changes in `docker/cli`
surajnarwade added a commit to surajnarwade/kompose that referenced this issue Nov 21, 2017
To resolve build context issue as mentioned in kubernetes#636
This PR will update vendor for `libcompose` and `docker/cli` and fix small issues from
`pkg/loader/compose/v3.go` which are occuring due to new changes in `docker/cli`
surajnarwade added a commit to surajnarwade/kompose that referenced this issue Nov 21, 2017
To resolve build context issue as mentioned in kubernetes#636
This PR will update vendor for `libcompose` and `docker/cli` and fix small issues from
`pkg/loader/compose/v3.go` which are occuring due to new changes in `docker/cli`
@tsauvajon
Copy link

tsauvajon commented Nov 24, 2017

How do you fix 'Build' expected a map, got 'string' for v3 when running kompose convert ? I'm on a Windows platform.

@rkachowski
Copy link

@tsauvajon I've had this same problem, it looks like kompose doesn't respect the optional string parameter. You can work around it by changing the config to a map like so

  build:
    context: ./build_path

@tsauvajon
Copy link

@rkachowski oh okay I had not understood the error message thanks a lot!

procrypt pushed a commit to procrypt/kompose that referenced this issue Feb 4, 2018
Resolves kubernetes#636

This PR will add support for `build` in docker compose v3.
As docker/cli#481 got merged now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants