-
Notifications
You must be signed in to change notification settings - Fork 28
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
chore: update dind examples to use onCreateCommand #350
Conversation
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.
Some minor nits but otherwise LGTM.
# which will handle most of the steps of setting up Docker. | ||
# We can't put this in the entrypoint as it gets overridden, so | ||
# we call it in the on-create script. |
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.
Do we not support setting entrypoint in the Dockerfile at all? Maybe we should in the future.
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.
My observation is that whatever entrypoint you set gets overridden by ENVBUILDER_INIT_COMMAND
/ ENVBUILDER_INIT_SCRIPT
. But agreed, we should fall back to the entrypoint in the Dockerfile.
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.
For a Coder workspace we need to have coder_agent.*.init_script
as the entry point so another option to handle the ENTRYPOINT
is to run it as part of coder_agent
startup_script
. This will work for at least the case when envbuilder is used with Coder.
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.
Filed #351 to follow up on this.
(cherry picked from commit 7c8e6a4)
The existing Docker examples override
ENVBUILDER_INIT_SCRIPT
, which is annoying if you're trying to use them with Coder. Update the examples indocker
to useonCreateCommand
instead.To test them out locally: