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

[WIP] Add support docker compose plugin #15

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

Caroga
Copy link

@Caroga Caroga commented Jul 30, 2022

Description

I am using the new docker compose plugin docker-compose-plugin which comes bundled with docker when installing the latest version. This does not require you to install the docker-compose plugin manually and works as part of the docker command.

Notes

  • This change will primarily aim to use docker-compose which gives me the feeling it's less of an impact.
  • I cannot test this for backwards compatibility as I don't have the docker-compose library anymore, please test.

The Makefile for this project expects to use the docker-compose command to bring up the project.
I've added checks to determine if we can use docker-compose which will in turn check the docker compose API version to determine the separator (existing functionality).

In case docker-compose was not found it will check for the docker compose plugin and will throw an error and exit the program if this is also not found.

Some changes I made:

  • Default the SEPARATOR var to _, which will only be overwritten to - in case you are using a older version of docker-compose. The assumption here is that the new docker compose plugin defaults to v2 or higher.
  • Introduced DOCKER_COMPOSE_CMD. Defaults to docker-compose, will be overwritten if docker-compose is not found and the docker compose plugin is detected.
  • Suppress .env file operation output from the console.

Related issues

None

Todo

  • (Not applicable) Ensure any install or build dependencies are removed before the end of the layer when doing a build.
  • Update the CHANGELOG.md with details of changes to the project.
  • (Not applicable) If applicable, update the README.md or associated documentation to cover the changes to the project.
  • Test backwards compatibility with docker-compose

@Caroga Caroga requested a review from khalwat as a code owner July 30, 2022 14:31
@khalwat
Copy link
Collaborator

khalwat commented Jul 30, 2022

Let me know when you no longer consider this a WIP, or what specifically you need my input on.

@Caroga
Copy link
Author

Caroga commented Jul 31, 2022

@khalwat I still consider it WIP due to the backwards compatibility test. I don't have a device with the older docker-compose plugin therefore I cannot test this.
Are you able to perform this test, or maybe someone else?
Once the test for BC is successful I would say the PR is ready.

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 this pull request may close these issues.

2 participants