Skip to content

Commit

Permalink
Added Azure CLI to Image (#74)
Browse files Browse the repository at this point in the history
* added az cli to image

* reset cert

* added az cli to image

* removed unnecessary sudo
  • Loading branch information
sebastiengorman-ssc authored Mar 4, 2024
1 parent 0247119 commit afc4ca6
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
3 changes: 2 additions & 1 deletion devcontainer/build/.env
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
################################
# TAG follows Symantic Versioning
# https://semver.org/
export TAG=2.0.2
export TAG=2.3.5
export COMPOSE_PROJECT_NAME=cpedevcontainer
export CPE_USERNAME=cpeuser
export PUB_CERT1_PATH=<<cert1.crt>>
Expand All @@ -15,3 +15,4 @@ export GCLD_SDK=443.0.0
export GATOR=v3.13.0
export KPT=v1.0.0-beta.43
export YQ=v4.34.2
export AZ_CLI=2.57.0
12 changes: 12 additions & 0 deletions devcontainer/build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ARG GCLD_SDK
ARG GATOR
ARG KPT
ARG YQ
ARG AZ_CLI

# User
RUN adduser --quiet --shell /bin/bash --home /home/${CPE_USERNAME} --gecos "User" ${CPE_USERNAME} --disabled-password
Expand All @@ -32,6 +33,7 @@ RUN apt-get update && \
pkg-config \
python3.10 \
python-is-python3 \
python3-pip \
python3-yaml \
bash-completion \
software-properties-common
Expand All @@ -45,6 +47,16 @@ RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o
docker-compose-plugin && \
usermod -a -G docker ${CPE_USERNAME}

# Azure Cli
RUN mkdir -p /etc/apt/keyrings && \
curl -sLS https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | tee /etc/apt/keyrings/microsoft.gpg > /dev/null && \
chmod go+r /etc/apt/keyrings/microsoft.gpg && \
AZ_DIST=$(lsb_release -cs) && \
echo "deb [arch=`dpkg --print-architecture` signed-by=/etc/apt/keyrings/microsoft.gpg] https://packages.microsoft.com/repos/azure-cli/ $AZ_DIST main" | tee /etc/apt/sources.list.d/azure-cli.list && \
apt-get update && \
apt-get install azure-cli=${AZ_CLI}-1~$AZ_DIST && \
az extension add --name azure-devops

# Google Cli
RUN wget -qO- https://storage.googleapis.com/cloud-sdk-release/google-cloud-cli-${GCLD_SDK}-linux-x86_64.tar.gz | tar zxv -C /usr/local/bin && \
/usr/local/bin/google-cloud-sdk/install.sh --usage-reporting false --screen-reader true --command-completion true --additional-components kubectl gke-gcloud-auth-plugin beta alpha nomos gsutil app-engine-python-extras config-connector
Expand Down
1 change: 1 addition & 0 deletions devcontainer/build/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ services:
GATOR: ${GATOR}
KPT: ${KPT}
YQ: ${YQ}
AZ_CLI: ${AZ_CLI}
labels:
ca.gc.ssc-spc.ctob.author: "Cloud Platform Engineering"
ca.gc.ssc-spc.ctob.purpose: "Container used with versioned developer tools"
Expand Down
2 changes: 1 addition & 1 deletion devcontainer/run/.env
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##############################
# Runtime compose arguments #
##############################
export TAG=2.0.2
export TAG=2.3.5
export COMPOSE_PROJECT_NAME=cpedevcontainer
export CPE_USERNAME=cpeuser
export PUB_CERT1_PATH=<<cert1.crt>>
Expand Down

0 comments on commit afc4ca6

Please sign in to comment.