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

[Docker Compose] Build Docker Compose in Go #15

Closed
nebuk89 opened this issue Mar 6, 2020 · 23 comments
Closed

[Docker Compose] Build Docker Compose in Go #15

nebuk89 opened this issue Mar 6, 2020 · 23 comments
Labels
cli Improvements to the Docker CLI compose Improvements to Docker Compose

Comments

@nebuk89
Copy link
Contributor

nebuk89 commented Mar 6, 2020

Tell us about your request
Release a feature parity version of Docker Compose written in Go

Which service(s) is this request for?
Dev-tools

Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?
We are generally aligned on Go for most of our development in Docker and Compose is an outlier for this. This also gives us an opportunity to revisit the UX of the CLI and make sure it is what people expect and need

Are you currently working around this issue?
N/A
Additional context
N/A
Attachments

@dominikbraun
Copy link

When will the code of that new version be published, and is it going to be a branch of docker/compose? :)

@ndeloof
Copy link

ndeloof commented Mar 12, 2020

@dominikbraun not sure how we plan to organize the code. We indeed could get it hosted on docker/compose as a "v2", which would help in the transition regarding feature requests/bug reports, but doing so would also isolate compose-in-go from the docker CLI, while we want compose to become a first-class citizen in the CLI.

@dominikbraun
Copy link

Thanks @ndeloof, I just asked because I don't want to miss the publication of the project since I'd really like to contribute.

@nebuk89
Copy link
Contributor Author

nebuk89 commented Nov 9, 2020

@dominikbraun or others who have up voted this, would any of you be interested in running through what you are looking to do with Compose in Go? If so drop me an email on [email protected]. Thanks!

@ShadowJonathan
Copy link

Will this deprecate the python version of docker-compose?

@JohnPreston
Copy link

Will this deprecate the python version of docker-compose?

Same concern as @ShadowJonathan, hope this does not mean the py package won't see any updates anymore...

@sebdanielsson
Copy link

sebdanielsson commented Jan 21, 2021

When could this be done? A version written in go would be great for us portainer users as referenced above!😃

@ndeloof
Copy link

ndeloof commented Jan 22, 2021

@sebdanielsson see https://github.com/docker/compose-cli/tree/main/local/compose
Already deployed as docker compose by latest Docker Desktop for Mac/Windows users

@sebdanielsson
Copy link

Is Apple Silicon support planned fornthe next major release? Is it planned for february or mars? Ready to get the Macbook Air when Docker is supported👍

@anshrma
Copy link

anshrma commented Feb 8, 2021

@ndeloof / @nebuk89 - What would be the docker-compose build and docker-compose push equivalent in docker compose ?

@ndeloof
Copy link

ndeloof commented Feb 9, 2021

@anshrma Both are supported already, did you have it a try?

@chris-crone
Copy link
Member

So now that docker compose has been in Docker Desktop for a while, have any of you tried it? Any feedback?

Will this deprecate the python version of docker-compose?

@ShadowJonathan @JohnPreston We don't have plans to change anything on docker-compose yet. We need more feedback on docker compose before we know what we'll do with it. What are you using the Python packages for?

Is Apple Silicon support planned fornthe next major release? Is it planned for february or mars? Ready to get the Macbook Air when Docker is supported👍

@sebdanielsson We have a preview of Docker Desktop for M1 which you can find here: https://docs.docker.com/docker-for-mac/apple-m1/

@nebuk89 nebuk89 added cli Improvements to the Docker CLI compose Improvements to Docker Compose labels Apr 29, 2021
@devoto13
Copy link

devoto13 commented May 9, 2021

I've tried to run docker compose up on one of my projects, but it couldn't pull images. I use amazon-ecr-credential-helper to authenticate against AWS Container Registry. Are credential helpers supported by the new command? Or is it something that needs to be done on the amazon-ecr-credential-helper side to work with docker compose command?

Found docker-archive/compose-cli#168, but the description is not very clear.

@ndeloof
Copy link

ndeloof commented May 9, 2021

Support for credentials helper has been fixed by docker-archive/compose-cli#1651

@ProgrammerPepe
Copy link

Has anyone else noticed that docker compose builds faster than docker-compose? (I assume it's due to being written in go)

@ndeloof
Copy link

ndeloof commented Jun 25, 2021

@ProgrammerPepe both docker-compose build and docker compose build do rely on the engine to execute the required build commands, so the command line being written in go has no impact. But docker compose uses Buildkit by default (while this is an option for docker-compose, and Buildkit uses advanced cache and parallelism optimizations to make builds faster.

@abdennour
Copy link

Who can list all difference points between docker compose and docker-compose ?

@ndeloof
Copy link

ndeloof commented Jun 26, 2021

@abdennour docker compose has been designed to be backward compatible with docker-compose
if introduces a few new commands (compose ls, compose cp) and allow to run commands without the original compose.yaml file (by passing -p <project_name> flag)
But the main point is that "Compose v2" will evolve aside the Docker CLI, with ability to share code, so won't be 6 to 12 months late to adopt new features.

@JohnPreston
Copy link

JohnPreston commented Jun 26, 2021

@ndeloof can we guarantee that whichever compose we use, docker compose or docker-compose, the compose-specification will remain the source of truth for both tools when it comes down to the definition of it, and that for shell related integrations, ie env vars and such substitutions will remain the same in both so that, which ever tool one uses, they do not have to make changes do the source compose files?
Not doing so would most simply create more problems than anything else.

@ndeloof
Copy link

ndeloof commented Jun 26, 2021

@JohnPreston I can't "guarantee" anything :) but the intent is to offer a smooth migration from docker-compose to docker compose, which means the existing behaviors should be replicated. While there might be a few "features" we might want to revisit, we don't want to create friction.

@JohnPreston
Copy link

I understand that you might want to have new features, but the specification for compose must be respected in either projects with the same source schema, otherwise you might as well not use either.

One thing that I find odd when you say the intent is to migrate to docker compose in GO away from the python version, is that, I assume, I then need a fully installed docker environment. I can think of many cases where I would like to be able to use docker-compose for validation and other standalone tasks which do not require to have docker installed to start with, and all one needs is python which is widely installed by default.

@ndeloof
Copy link

ndeloof commented Jun 27, 2021

docker compose installation obviously is distinct from the docker-compose one, there will be some migration effort. But afaict there are a very few set of users to install docker-compose but not docker on a system. The only command you can run without a docker engine is config, which isn't very useful: Using docker-compose to "validate" is not highly relevant: it doesn't mean your compose file will start successfully, just it matches the schema bundled in your tool. docker compose config can be used for the same purpose if you're looking into this feature.

@JohnPreston
Copy link

docker compose installation obviously is distinct from the docker-compose one, there will be some migration effort. But afaict there are a very few set of users to install docker-compose but not docker on a system. The only command you can run without a docker engine is config, which isn't very useful: Using docker-compose to "validate" is not highly relevant: it doesn't mean your compose file will start successfully, just it matches the schema bundled in your tool. docker compose config can be used for the same purpose if you're looking into this feature.

Fair enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Improvements to the Docker CLI compose Improvements to Docker Compose
Projects
Status: Shipped! Enjoy!
Development

No branches or pull requests