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

How to pass command line args as env var in docker-compose file? #25

Closed
amnesiacsardine opened this issue Jul 6, 2022 · 3 comments · Fixed by #34
Closed

How to pass command line args as env var in docker-compose file? #25

amnesiacsardine opened this issue Jul 6, 2022 · 3 comments · Fixed by #34
Labels
enhancement New feature or request question Further information is requested

Comments

@amnesiacsardine
Copy link
Contributor

As the title says. If it is not implemented yet, how else can I change the default behavior?

@amnesiacsardine
Copy link
Contributor Author

Okay I realized that the CMD bracket in the Docker file is a list so I could add arguments like so CMD ["microbin", "--highlightsyntax", "--private"]

Great that it works but environment variables would obviously be ideal.

@szabodanika szabodanika added enhancement New feature or request question Further information is requested labels Jul 6, 2022
@szabodanika
Copy link
Owner

Hello @amnesiacsardine and welcome! Thanks for raising this issue. I must admit I am not a big Docker expert and I have pretty much no experience in properly dockerising services. I agree with your suggestion though and will look into it. As always, PRs are also very welcome if you happen to know how to solve this. 😃 For now, anyone facing the same issue will definitely find your comment above helpful.

@uniqueNullptr2
Copy link
Contributor

as an additional reference to amnesiacsardine: you can override the command from the docker-compose as well. no need to rewrite the dockerfile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants