-
Notifications
You must be signed in to change notification settings - Fork 220
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
Support for custom commands upon entering container #1302
Comments
Hey, @josecastillolema ! I remember we discussed this before. In this specific Containerfile there's:
I remember you wanted |
I remember that you had mentioned offering a hook in the Containerfile to specify commands to be run inside the container. I can think of two broad categories:
These are likely necessary to be run only once when the container starts. The entry point can read these from the Containerfile hook and run them.
These are likely necessary to be run on every invocation of All that makes me wonder if we need two separate Containerfile hooks to differentiate between those cases, and what those hooks might be. I am apprehensive of using CMD for this because there are images out there with unexpected things in |
Some custom annotation in the Dockerfile comments specific to toolbox could do the trick as well. |
This comment was marked as resolved.
This comment was marked as resolved.
toolbox run -c boxname command |
this means it should work right? |
Is your feature request related to a problem? Please describe.
Today, for running custom commands when entering a toolbox container the recommendations is to have a custom .bashrc entry, i.e.: toolbox.sh.
This makes the toolbox configuration split into two files, the Containerfile (i.e.: Containerfile) and the bash script ^.
Describe the solution you'd like
To follow best IaC/declarative practices, it would be better to have all the configuration related to the container in one place, the Containerfile. For that to happen, toolbox should support a way to place custom commands somewhere in the Containerfile (i.e. the
RUN
section).The text was updated successfully, but these errors were encountered: