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

Put cfg.entrypoint toEntrypoint instead of Cmd #570

Merged
merged 1 commit into from
May 3, 2023

Conversation

Atry
Copy link
Contributor

@Atry Atry commented May 3, 2023

Currently when the image built by devenv is run with custom arguments, Cmd will be replaced. As a result, the script created by mkEntrypoint would not get executed. For example, the following command will fail because bash is not in the path:

docker run -it my-image bash

even when bash is added to packages:

packages = [pkg.bash];

This PR set Entrypoint to cfg.entrypoint so that is would not be overwritten by docker run arguments.

Entrypoint = cfg.entrypoint;

Now docker run works:

docker run -it my-image bash

@Atry Atry changed the title Keep Entrypoint when overriding Cmd Put cfg.entrypoint toEntrypoint instead of Cmd May 3, 2023
@domenkozar domenkozar merged commit ff1f29e into cachix:main May 3, 2023
@Atry Atry deleted the entrypoint branch May 6, 2023 23:49
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.

None yet

2 participants