I am trying to configure a new Rails application using devcontainer and this is my Dockerfile at .devcontainer file:
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version
ARG RUBY_VERSION=3.4.1
FROM ghcr.io/rails/devcontainer/images/ruby:$RUBY_VERSION
WORKDIR /workspaces/decode
RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v1.2.0/zsh-in-docker.sh)" -- \
-t https://github.com/romkatv/powerlevel10k \
-p https://github.com/zsh-users/zsh-autosuggestions \
-p https://github.com/zsh-users/zsh-syntax-highlighting \
-a 'export TERM=xterm-256color'
RUN echo '[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh' >> ~/.zshrc
I'm used to use powerlevel10k along with zsh and to have some plugins and history as well. The problem is: Apparently this Dockerfile run this commands, but after the container build is complete, neither the powerlevel10k is setted as zsh theme nor the plugins are installed. I realize some features at my devcontainer.json install Zsh for default and probably is overriding. It's only a guess, though. Here is my devcontainer features:
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/rails/devcontainer/features/activestorage": {},
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {},
"ghcr.io/rails/devcontainer/features/postgres-client": {}
},
I am trying for days to configure the powerlevel10k and no success. I tried to place powerlevel10k as a feature inside my devcontainer.json, but it didn't work either. If I tried to ran the commands from Dockerfile after the container is builded, evertything works.
-p git