Docker Container Startup Script Tab (/root/.profile?) #3515
Closed
Pcrossley69
started this conversation in
Ideas
Replies: 1 comment
-
Re-posted as feature request |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Although I build containers for specific purposes, I still find it useful to use stock Docker images from the docker hub to act as small servers or clients, however I often need to run a sequence of commands to start the server I want.
The right click menu for docker containers currently allows the startup command to be specified and
for the simplest tasks the start command box can include a few commands within parentheses but this is not suitable when several commands must be run.
The right click menu for docker containers also allows /etc/network/interfaces to be configured.
It would be useful to have an additional tab with a text box for entering a shell script to be run when the container starts.
This would make life a lot easier when sharing portable projects because the shell script would be embedded in the project.
(the alternative is to create a load of small container images from stock Alpine or Ubuntu images and embed the links to those in the portable project).
I currently start my generic linux containers with "sh -l" (create a login shell) so that the users .profile is executed.
I then configure the /root/.profile to perform my container startup and use the advanced tab to make /root a persistent directory.
My proposal of a new tab that contains the startup file would simplify this.
The most flexible option would be to allow the file path to be specified as well as its contents, but failing this just giving access to /root/.profile (in the same way as we already have access to /etc/network/interfaces) would be a huge help.
Beta Was this translation helpful? Give feedback.
All reactions