mirror of
https://github.com/kasmtech/workspaces-images.git
synced 2025-01-24 06:28:54 +01:00
KASM-1860 Add SHELL_EXEC environment variable for terminal image
- This command will be called when the terminal launches via .bashrc
This commit is contained in:
parent
f08dcab60e
commit
776e213c9f
@ -13,6 +13,13 @@ RUN apt-get update && apt-get install -y tmux screen nano dnsutils zip
|
||||
|
||||
RUN echo "set -g mouse on" > $HOME/.tmux.conf && chown 1000:1000 $HOME/.tmux.conf
|
||||
|
||||
### Update .bashrc to run an arbitrary command if specified as an environment variable
|
||||
RUN echo "if [ ! -z \"\${SHELL_EXEC}\" ] && [ \"\${TERM}\" == \"xterm-256color\" ] ; \n\
|
||||
then \n\
|
||||
set +e \n\
|
||||
eval \${SHELL_EXEC} \n\
|
||||
fi " >> $HOME/.bashrc && chown 1000:1000 $HOME/.bashrc
|
||||
|
||||
### Install Ansible
|
||||
COPY ./src/ubuntu/install/ansible $INST_SCRIPTS/ansible/
|
||||
RUN bash $INST_SCRIPTS/ansible/install_ansible.sh && rm -rf $INST_SCRIPTS/ansible/
|
||||
|
@ -8,4 +8,5 @@ This Image contains a browser-accessible version of [xfce4-terminal](https://doc
|
||||
|
||||
# Environment Variables
|
||||
|
||||
* `APP_ARGS` - Additional arguments to pass to the application when launched.
|
||||
* `TERMINAL_ARGS` - Additional arguments to pass to the application when launched.
|
||||
* `SHELL_EXEC`- A command to run when the terminal starts
|
||||
|
Loading…
Reference in New Issue
Block a user