-
Notifications
You must be signed in to change notification settings - Fork 5.9k
[Feat]: Dockerfile entrypoint.d #5177
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
Labels
enhancement
Some improvement that isn't a feature
Milestone
Comments
What are your thoughts on this @code-asher ? |
Is overriding the entrypoint an option? Something like:
```
$ mkdir entrypoint.d
$ cat << EOF >> entrypoint.d/my-script.sh
#!/bin/sh
echo hello
/usr/bin/entrypoint.sh --bind-addr 0.0.0.0:8080 .
EOF
$ chmod +x entrypoint.d/*
$ docker run -v $PWD/entrypoint.d:/entrypoint.d --entrypoint /entrypoint.d/my-script.sh codercom/code-server:latest
```
|
That is one way to do it, I'm slightly concerned about the following bit of code.
Currently I build a custom image that inserts the following code after this section.
|
I think it should generally be OK although I could imagine issues if the
user's scripts referenced a hardcoded user or if the UID was
non-standard since fixuid would not have had a chance to run yet.
So with that in mind you are probably right that adding that code into
the entrypoint.sh is the better solution. Please feel free to submit a
PR and we can get it merged in!
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What is your suggestion?
Add logic to the entrypoint to load user provided entrypoint scripts.
Why do you want this feature?
This would allow for us to setup the workspace beyond the base image without maintaining individual images per purpose.
For example, we could call to install a language or runtime dependency, or even install code-server plugins.
Are there any workarounds to get this functionality today?
Manually run the scripts via the code-server terminal.
Are you interested in submitting a PR for this?
Possibly.
The text was updated successfully, but these errors were encountered: