-
Notifications
You must be signed in to change notification settings - Fork 130
change out .devcontainer content for Codespaces environments #183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
01f3e26
4eee5c7
519ce22
62117ee
8895dd7
0a33291
5542411
66076ec
306e326
23de0bf
cc2b4fa
faeba32
c48bc1a
f460892
99caac6
b499f67
e347d89
67d02c4
1388247
ec73d28
1f31731
5898228
ec340b7
a41b76b
acd7b19
baddbd1
ecdb117
e327447
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,37 +1,22 @@ | ||
| { | ||
| "name": "Radius", | ||
| "dockerComposeFile": ["./docker-compose.yaml"], | ||
| "service": "rp", | ||
| "workspaceFolder": "/workspace/radius", | ||
| "remoteEnv": { | ||
| "SYNC_LOCALHOST_KUBECONFIG": "true" | ||
| }, | ||
| "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ], | ||
|
|
||
| "name": "Codespaces for Radius tutorials", | ||
|
|
||
| "image": "radiusteam/radcodespace:latest", | ||
|
|
||
| // Set *default* container specific settings.json values on container create. | ||
| "settings": { | ||
| "terminal.integrated.shell.linux": "/bin/bash", | ||
| "go.useGoProxyToCheckForToolUpdates": false, | ||
| "go.useLanguageServer": true, | ||
| "go.gopath": "/go", | ||
| "go.goroot": "/usr/local/go", | ||
| "go.toolsGopath": "/go/bin" | ||
| "settings": { | ||
| "terminal.integrated.shell.linux": "/bin/bash" | ||
| }, | ||
|
|
||
| // Add the IDs of extensions you want installed when the container is created. | ||
| "extensions": [ | ||
| "golang.Go", | ||
| "ms-azuretools.vscode-docker", | ||
| "ms-kubernetes-tools.vscode-kubernetes-tools" | ||
| "ms-vscode.azurecli", | ||
| "ms-dotnettools.vscode-dotnet-runtime", | ||
| "/home/rad-vscode-bicep.vsix" | ||
| ], | ||
|
|
||
| "forwardPorts": [3000], | ||
|
emily-potyraj marked this conversation as resolved.
|
||
|
|
||
| // Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
| "forwardPorts": [5000], | ||
|
|
||
| // Use 'postCreateCommand' to run commands after the container is created. | ||
| "postCreateCommand": "&& go mod download", | ||
|
|
||
| // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. | ||
| "remoteUser": "vscode", | ||
| "shutdownAction": "stopCompose" | ||
| // Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root. | ||
| "remoteUser": "vscode" | ||
| } | ||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| 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 | ||
|
emily-potyraj marked this conversation as resolved.
|
||
|
|
||
| # Install rad CLI (Linux) | ||
| # TODO: change to make binary directly inside this Dockerfile? | ||
| RUN wget -O /usr/local/bin/rad https://radiuspublic.blob.core.windows.net/tools/rad/edge/linux-x64/rad | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think a better thing to do might be to make this part of the Ex: https://github.com/Azure/radius/blob/main/.github/workflows/build.yaml#L154
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This comment is marked as resolved but it's still downloading this from the storage URL - are you planning to have someone else fix this later or was the resolution different from what I remember?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. based on our chat earlier this week, I opened a new issue #322 for that change to pulling |
||
| RUN chmod +rx /usr/local/bin/rad | ||
|
|
||
| # Download Radius VSCode extension | ||
| RUN wget -O /home/rad-vscode-bicep.vsix https://radiuspublic.blob.core.windows.net/tools/vscode/edge/rad-vscode-bicep.vsix | ||
|
|
||
| USER vscode | ||
|
|
||
| RUN touch ~/.vimrc | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
|
|
||
| 👋 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/ | ||
|
|
||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| #!/usr/bin/env bash | ||
| #------------------------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. | ||
| #------------------------------------------------------------------------------------------------------------- | ||
| # | ||
| # 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!" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| #!/usr/bin/env bash | ||
| #------------------------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. | ||
| #------------------------------------------------------------------------------------------------------------- | ||
| # | ||
| # 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!" |
Uh oh!
There was an error while loading. Please reload this page.