@@ -22,6 +22,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
2222 git \
2323 sudo \
2424 openssh-client \
25+ # Shell et plugins
26+ zsh \
27+ zsh-autosuggestions \
28+ zsh-syntax-highlighting \
2529 # Outils d'analyse et debug
2630 ripgrep \
2731 fd-find \
@@ -41,9 +45,12 @@ RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | d
4145 && apt-get install -y gh \
4246 && rm -rf /var/lib/apt/lists/*
4347
44- # Création de l'utilisateur non-root
48+ # Installation de Starship (prompt moderne)
49+ RUN curl -fsSL https://starship.rs/install.sh | sh -s -- -y
50+
51+ # Création de l'utilisateur non-root avec zsh
4552RUN groupadd --gid $USER_GID $USERNAME \
46- && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
53+ && useradd --uid $USER_UID --gid $USER_GID -m -s /bin/zsh $USERNAME \
4754 && echo $USERNAME ALL=\( root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
4855 && chmod 0440 /etc/sudoers.d/$USERNAME
4956
@@ -54,7 +61,87 @@ RUN curl -fsSL https://claude.ai/install.sh | bash
5461RUN mkdir -p /home/$USERNAME/.claude && \
5562 chown -R $USERNAME:$USERNAME /home/$USERNAME/.claude
5663
64+ # Configuration zsh pour l'utilisateur
65+ RUN cat <<'EOF' > /home/$USERNAME/.zshrc
66+ # Historique
67+ HISTFILE=~/.zsh_history
68+ HISTSIZE=10000
69+ SAVEHIST=10000
70+ setopt SHARE_HISTORY
71+ setopt HIST_IGNORE_DUPS
72+ setopt HIST_IGNORE_SPACE
73+
74+ # Navigation style fish
75+ setopt AUTO_CD
76+ setopt AUTO_PUSHD
77+ setopt PUSHD_IGNORE_DUPS
78+ setopt CORRECT
79+
80+ # Complétion avancée
81+ autoload -Uz compinit && compinit
82+ zstyle ':completion:*' menu select
83+ zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
84+ zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
85+
86+ # Plugins (autosuggestions + syntax highlighting)
87+ source /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh
88+ source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
89+
90+ # Couleur des suggestions (gris clair)
91+ ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=244'
92+
93+ # Raccourcis clavier style fish
94+ bindkey '^[[A' history-search-backward
95+ bindkey '^[[B' history-search-forward
96+ bindkey '^[[1;5C' forward-word
97+ bindkey '^[[1;5D' backward-word
98+ bindkey '^[[H' beginning-of-line
99+ bindkey '^[[F' end-of-line
100+ bindkey '^[[3~' delete-char
101+ bindkey '^ ' autosuggest-accept
102+
103+ # Aliases utiles
104+ alias ls='ls --color=auto'
105+ alias ll='ls -lah'
106+ alias la='ls -A'
107+ alias l='ls -CF'
108+ alias grep='grep --color=auto'
109+ alias fd='fdfind'
110+
111+ # Starship prompt
112+ eval "$(starship init zsh)"
113+ EOF
114+
115+ # Configuration Starship (thème sobre et informatif)
116+ RUN mkdir -p /home/$USERNAME/.config && cat <<'EOF' > /home/$USERNAME/.config/starship.toml
117+ # Prompt minimaliste style fish
118+ format = """
119+ $directory\
120+ $git_branch\
121+ $git_status\
122+ $character"""
123+
124+ [directory]
125+ style = "cyan bold"
126+ truncation_length = 3
127+ truncate_to_repo = true
128+
129+ [git_branch]
130+ symbol = " "
131+ style = "purple"
132+
133+ [git_status]
134+ style = "red bold"
135+ format = '([$all_status$ahead_behind]($style) )'
136+
137+ [character]
138+ success_symbol = "[❯](green)"
139+ error_symbol = "[❯](red)"
140+ EOF
141+
142+ RUN chown -R $USERNAME:$USERNAME /home/$USERNAME/.zshrc /home/$USERNAME/.config
143+
57144USER $USERNAME
58145WORKDIR /workspaces
59146
60- CMD ["bash " ]
147+ CMD ["zsh " ]
0 commit comments