-
Notifications
You must be signed in to change notification settings - Fork 47
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
DevEx: add fix for docker compose invocation #5609
DevEx: add fix for docker compose invocation #5609
Conversation
creates compatibility for docker compose or docker-compose
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if command -v docker-compose &> /dev/null; then | ||
DOCKER_COMPOSE="docker-compose" | ||
else | ||
DOCKER_COMPOSE="docker compose" | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some possibly-breaking changes between docker-compose
and docker compose
regarding container names:
Compose generates container names based on the project name, service name, and scale/replica count. In Compose V1, an underscore (_) was used as the word separator. In Compose V2, a hyphen (-) is used as the word separator.
I am not sure if this makes a huge difference for our local development environment, but something still to be mindful of.
Link for reference: https://docs.docker.com/compose/releases/migrate/
While I am all for enabling and embracing choice for manual workflows, I think the app's build toolchain should be standardized so we can eliminate discrepancies at compilation and runtime. In theory this can reduce instances of "why does this work for me and not for you?" frustration. That said, I dunno...how a developer runs the app locally feels like a pretty personal thing. If this were anywhere other than |
Should we discuss in parking lot? I would like to hear more on this |
creates compatibility for docker compose or docker-compose