# Use the base image specified in the devcontainer.json FROM mcr.microsoft.com/devcontainers/base:bullseye # Install dependencies RUN apt-get update && apt-get install -y \ wget \ apt-transport-https \ curl \ gnupg2 \ lsb-release \ software-properties-common \ openssh-server # Configure SSH server RUN mkdir /var/run/sshd \ && echo 'root:Docker!' | chpasswd \ && sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config \ && sed -i 's@session required pam_loginuid.so@session optional pam_loginuid.so@g' /etc/pam.d/sshd \ && echo "export VISIBLE=now" >> /etc/profile # Expose SSH port EXPOSE 22 # Start SSH service CMD ["/usr/sbin/sshd", "-D"] # Install .NET SDKs (6, 7, 8, 9, and 10) RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh \ && chmod +x dotnet-install.sh \ && ./dotnet-install.sh --channel 6.0 --install-dir /usr/share/dotnet \ && ./dotnet-install.sh --channel 7.0 --install-dir /usr/share/dotnet \ && ./dotnet-install.sh --channel 8.0 --install-dir /usr/share/dotnet \ && ./dotnet-install.sh --channel 9.0 --install-dir /usr/share/dotnet \ && ./dotnet-install.sh --channel 10.0 --install-dir /usr/share/dotnet \ && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet # Install Node.js LTS RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - \ && apt-get install -y nodejs # Install Yarn RUN npm install -g yarn # Install GitHub CLI RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg \ && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \ && apt-get update \ && apt-get install -y gh # Install Azure CLI RUN curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | tee /etc/apt/trusted.gpg.d/microsoft.asc.gpg > /dev/null \ && AZ_REPO=$(lsb_release -cs) \ && echo "deb [arch=$(dpkg --print-architecture)] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | tee /etc/apt/sources.list.d/azure-cli.list \ && apt-get update \ && apt-get install -y azure-cli # Clean up RUN rm dotnet-install.sh \ && apt-get clean \ && rm -rf /var/lib/apt/lists/*