1+ # Use the base dev container image
2+ FROM mcr.microsoft.com/devcontainers/base:ubuntu
3+
4+ # Update package lists and install required packages
5+ RUN apt-get update && apt-get install -y \
6+ curl \
7+ wget \
8+ btop \
9+ fontconfig \
10+ git \
11+ unzip \
12+ xz-utils \
13+ zip \
14+ libglu1-mesa \
15+ software-properties-common \
16+ && apt-get clean \
17+ && rm -rf /var/lib/apt/lists/*
18+
19+ # Install .NET 10 SDK
20+ RUN add-apt-repository ppa:dotnet/backports \
21+ && apt-get update \
22+ && apt-get install -y dotnet-sdk-10.0 \
23+ && apt-get clean \
24+ && rm -rf /var/lib/apt/lists/*
25+
26+ # Install Hack Nerd Font for terminal use
27+ RUN mkdir -p ~/.fonts && wget -q -P ~/.fonts https://github.com/ryanoasis/nerd-fonts/releases/latest/download/Hack.zip \
28+ && unzip -o ~/.fonts/Hack.zip -d ~/.fonts && fc-cache -fv \
29+ && rm -f ~/.fonts/Hack.zip
30+
31+ # Switch to the vscode user (assumes the user already exists in this base image)
32+ USER vscode
33+
34+ # Install Powerlevel10k theme
35+ RUN git clone --depth=1 https://github.com/romkatv/powerlevel10k.git /home/vscode/.oh-my-zsh/custom/themes/powerlevel10k \
36+ && sed -i 's|ZSH_THEME=".*"|ZSH_THEME="powerlevel10k/powerlevel10k"|' /home/vscode/.zshrc
37+
38+ # Install Zsh plugins
39+ RUN git clone https://github.com/zsh-users/zsh-autosuggestions /home/vscode/.oh-my-zsh/custom/plugins/zsh-autosuggestions \
40+ && git clone https://github.com/zsh-users/zsh-syntax-highlighting /home/vscode/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting \
41+ && git clone https://github.com/zsh-users/zsh-history-substring-search /home/vscode/.oh-my-zsh/custom/plugins/history-substring-search \
42+ && sed -i 's|plugins=(.*)|plugins=(git zsh-autosuggestions zsh-syntax-highlighting history-substring-search)|' /home/vscode/.zshrc
43+
44+ # Switch to the root user
45+ USER root
46+
47+ # Ensure proper permissions for the vscode user
48+ RUN chown -R vscode:vscode /home/vscode/.oh-my-zsh /home/vscode/.zshrc
49+
50+ # Switch to the vscode user (assumes the user already exists in this base image)
51+ USER vscode
52+
53+ # Set Zsh as the default shell and ensure the container starts with the vscode user
54+ WORKDIR /workspaces
55+ CMD [ "zsh" ]
56+ USER vscode
0 commit comments