Skip to content

Commit

Permalink
Added GitHub CLI and Azure CLI to DevContainer
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelstaib committed Aug 18, 2024
1 parent df28384 commit cd4fcbd
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions .devcontainer/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
FROM mcr.microsoft.com/devcontainers/base:bullseye

# Install dependencies
RUN apt-get update && apt-get install -y wget apt-transport-https curl
RUN apt-get update && apt-get install -y \
wget \
apt-transport-https \
curl \
gnupg2 \
lsb-release \
software-properties-common

# Install .NET SDKs (6, 7, and 8)
RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh \
Expand All @@ -19,7 +25,20 @@ RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - \
# 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/*
&& rm -rf /var/lib/apt/lists/*

0 comments on commit cd4fcbd

Please sign in to comment.