zsh-in-docker
zsh-in-docker copied to clipboard
Running in devcontainer - theme does not work
I am trying to run the zsh-in-docker script in a docker file like this:
RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v1.1.5/zsh-in-docker.sh)" -- \
-t eastwood -p git -x
You can see I am specifying eastwood
as the theme with the -t
option. This docker file is started with a vscode devcontainer. For some reason - after starting the container the ~/.zshrc file always has this setting for the theme like this:
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="devcontainers"
If I manually change the theme in the .zshrc to eastwood
and source it - then it works great with the selected theme.
There does not seem to be a theme even called "devcontainers" available!?? I also can't see any logic in your script that could do this so its weird!
Update - if I add this as a step at the end of the dockerfile it works: sed -i '/^ZSH_THEME/c\ZSH_THEME="eastwood"' /home/node/.zshrc
.
Must be something in vscode's devcontainer terminal startup that changes the ZSH_THEME, somehow?!?
This fix works for me too