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

Any plan on supporting docker-compose #70

Closed
arnav13081994 opened this issue Sep 16, 2020 · 7 comments · Fixed by #78
Closed

Any plan on supporting docker-compose #70

arnav13081994 opened this issue Sep 16, 2020 · 7 comments · Fixed by #78

Comments

@arnav13081994
Copy link

I was wondering if there was any plan to support build images from docker-compose as well?

@whoan
Copy link
Owner

whoan commented Sep 17, 2020

@arnav13081994 I thought about it and it would need many changes int he code, and as you can accomplish the same creating a step for each image you need to build based on the compose file, I decided it wasn't worth it.

I am not telling I can't change my mind in the future. I will leave this open just in case I have some free time to give it a try and to see if there are more people interested.

@arnav13081994
Copy link
Author

@whoan Yes, you are right.

@helloguille
Copy link

@whoan That sounds like a good option that would probably save a lot of headaches. Do you know if I build the images using this action separately, will this cache be used by docker compose afterwards?

@whoan
Copy link
Owner

whoan commented Sep 22, 2020

I tried to think of the different use cases reading from a compose file and having multiple images hosted in different registries is not an easy scenario to handle without many changes in the script.

I still think that it's better to build individually and then the docker-compose build should take advantage of the cache created by the individual builds as long as you use the correct names in the compose file in subsequent steps of the same job (that is what happens if you build individually in your host and then run docker-compose build).

I will continue thinking on it though.

@NasAmin
Copy link

NasAmin commented Dec 7, 2020

hmm, this Action rocks!
But we have a build script that uses docker-compose to build mutiple images. I used this action to build individual images but it results in:

  • Duplication of the config
  • passing multiple build args is a bit hard if you have a lot
  • You can't build locally the same way as you would in the CI pipeline. Our build script was designed so it would build and behave the same way no matter where it ran.

So the ability to run docker build or docker-compose would be amazing.

I also tried to use this action but it seems to make my builds even slower than if I don't use any cache at all.

I would appreciate if this is given some thought.

@whoan
Copy link
Owner

whoan commented Dec 7, 2020

Hi @NasAmin . Thanks for your feedback.
I promise I will give another chance to this issue in my spare time and will let you know the outcome.

@whoan
Copy link
Owner

whoan commented Dec 20, 2020

@NasAmin @arnav13081994 @helloguille You can test the branch support-compose-files to see if it works for you. I made this test and seems to work fine. I will wait for some feedback to merge and release a new version (probably v5.8.0)

@whoan whoan closed this as completed in #78 Dec 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants