From b102f3f80138324a88e87cb0fa69ac4fed83c0ab Mon Sep 17 00:00:00 2001 From: Ryan Nowak Date: Thu, 7 Dec 2023 10:20:03 -0800 Subject: [PATCH] Remove stale devcontainer Part-of: #6923 This change removes our **old** **outdated** and **unused** devcontainer. - There's another devcontainer definition in our repo and it's much more useful for developing Radius. - There's another devcontainer definition in our samples repo that's useful for trying out Radius. --- .devcontainer/tutorials-codespace/Dockerfile | 23 --------- .../tutorials-codespace/first-run-notice.txt | 5 -- .../library-scripts/azcli-debian.sh | 45 ------------------ .../library-scripts/kubectl-helm-debian.sh | 47 ------------------- 4 files changed, 120 deletions(-) delete mode 100644 .devcontainer/tutorials-codespace/Dockerfile delete mode 100644 .devcontainer/tutorials-codespace/first-run-notice.txt delete mode 100644 .devcontainer/tutorials-codespace/library-scripts/azcli-debian.sh delete mode 100644 .devcontainer/tutorials-codespace/library-scripts/kubectl-helm-debian.sh diff --git a/.devcontainer/tutorials-codespace/Dockerfile b/.devcontainer/tutorials-codespace/Dockerfile deleted file mode 100644 index 76235535582..00000000000 --- a/.devcontainer/tutorials-codespace/Dockerfile +++ /dev/null @@ -1,23 +0,0 @@ -ARG VARIANT=3.1 -FROM mcr.microsoft.com/vscode/devcontainers/dotnet:0-${VARIANT} - -USER root - -# Install library scripts & setup "first notice" -COPY library-scripts/* first-run-notice.txt /tmp/library-scripts/ -RUN bash /tmp/library-scripts/azcli-debian.sh \ - && bash /tmp/library-scripts/kubectl-helm-debian.sh \ - && mv -f /tmp/library-scripts/first-run-notice.txt /usr/local/etc/vscode-dev-containers/ \ - && apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts - -# Install rad CLI (Linux) -# TODO: change to make binary directly inside this Dockerfile? -RUN wget -O /usr/local/bin/rad https://get.radapp.dev/tools/rad/edge/linux-x64/rad -RUN chmod +rx /usr/local/bin/rad - -# Download Radius VSCode extension -RUN wget -O /home/rad-vscode-bicep.vsix https://get.radapp.dev/tools/vscode/edge/rad-vscode-bicep.vsix - -USER vscode - -RUN touch ~/.vimrc \ No newline at end of file diff --git a/.devcontainer/tutorials-codespace/first-run-notice.txt b/.devcontainer/tutorials-codespace/first-run-notice.txt deleted file mode 100644 index f1c4806a082..00000000000 --- a/.devcontainer/tutorials-codespace/first-run-notice.txt +++ /dev/null @@ -1,5 +0,0 @@ - -👋 Welcome to the Radius Codespace! You are on our Radius Tutorials image. It includes everything needed to run through our tutorials and example applications. -Radius docs can be found here: https://radapp.dev/ - - diff --git a/.devcontainer/tutorials-codespace/library-scripts/azcli-debian.sh b/.devcontainer/tutorials-codespace/library-scripts/azcli-debian.sh deleted file mode 100644 index 24ab5981c99..00000000000 --- a/.devcontainer/tutorials-codespace/library-scripts/azcli-debian.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env bash -# ------------------------------------------------------------ -# Copyright 2023 The Radius Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ------------------------------------------------------------ -# -# Docs: https://github.com/microsoft/vscode-dev-containers/blob/master/script-library/docs/azcli.md -# Maintainer: The VS Code and Codespaces Teams -# -# Syntax: ./azcli-debian.sh - -set -e - -if [ "$(id -u)" -ne 0 ]; then - echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.' - exit 1 -fi - -export DEBIAN_FRONTEND=noninteractive - -# Install curl, apt-transport-https, lsb-release, or gpg if missing -if ! dpkg -s apt-transport-https curl ca-certificates lsb-release > /dev/null 2>&1 || ! type gpg > /dev/null 2>&1; then - if [ ! -d "/var/lib/apt/lists" ] || [ "$(ls /var/lib/apt/lists/ | wc -l)" = "0" ]; then - apt-get update - fi - apt-get -y install --no-install-recommends apt-transport-https curl ca-certificates lsb-release gnupg2 -fi - -# Install the Azure CLI -echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/azure-cli.list -curl -sL https://packages.microsoft.com/keys/microsoft.asc | (OUT=$(apt-key add - 2>&1) || echo $OUT) -apt-get update -apt-get install -y azure-cli -echo "Done!" diff --git a/.devcontainer/tutorials-codespace/library-scripts/kubectl-helm-debian.sh b/.devcontainer/tutorials-codespace/library-scripts/kubectl-helm-debian.sh deleted file mode 100644 index a62271a706d..00000000000 --- a/.devcontainer/tutorials-codespace/library-scripts/kubectl-helm-debian.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env bash -# ------------------------------------------------------------ -# Copyright 2023 The Radius Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ------------------------------------------------------------ -# -# Docs: https://github.com/microsoft/vscode-dev-containers/blob/master/script-library/docs/kubectl-helm.md -# Maintainer: The VS Code and Codespaces Teams -# -# Syntax: ./kubectl-helm-debian.sh - -set -e - -if [ "$(id -u)" -ne 0 ]; then - echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.' - exit 1 -fi - -export DEBIAN_FRONTEND=noninteractive - -# Install curl if missing -if ! dpkg -s curl ca-certificates > /dev/null 2>&1; then - if [ ! -d "/var/lib/apt/lists" ] || [ "$(ls /var/lib/apt/lists/ | wc -l)" = "0" ]; then - apt-get update - fi - apt-get -y install --no-install-recommends curl ca-certificates -fi - -# Install the kubectl -echo "Downloading kubectl..." -curl -sSL -o /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl -chmod +x /usr/local/bin/kubectl -# Install Helm -echo "Installing Helm..." -curl -s https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash - -echo "Done!"