Skip to content

Commit

Permalink
devcontainer: Use dev:v5 (#7657)
Browse files Browse the repository at this point in the history
* Fixes the location of `kubectl`
* Adds `jq`
* Adds `yq`
* Add Go extension

(cherry picked from commit 4f6883c)
Signed-off-by: Oliver Gould <[email protected]>
  • Loading branch information
olix0r committed Mar 31, 2022
1 parent 6a4d2ec commit 119dde8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
9 changes: 7 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ RUN apt update && apt upgrade -y
RUN apt install -y \
clang \
cmake \
jq \
libssl-dev \
lldb \
lsb-release \
Expand Down Expand Up @@ -39,11 +40,15 @@ ENV HOME=/home/$USER
RUN mkdir -p $HOME/bin
ENV PATH=$HOME/bin:$PATH

RUN curl --proto '=https' --tlsv1.3 -vsSfLo $HOME/kubectl "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" \
&& chmod 755 $HOME/kubectl
RUN curl --proto '=https' --tlsv1.3 -vsSfLo $HOME/bin/kubectl "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" \
&& chmod 755 $HOME/bin/kubectl
RUN curl --proto '=https' --tlsv1.3 -vsSfL https://raw.githubusercontent.com/rancher/k3d/main/install.sh \
| USE_SUDO=false K3D_INSTALL_DIR=$HOME/bin bash

ARG YQ_VERSION=v4.2.0
RUN curl --proto '=https' --tlsv1.3 -vsSfL "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64" -o $HOME/bin/yq \
&& chmod +x $HOME/bin/yq

RUN curl --proto '=https' --tlsv1.3 -vsSfL https://sh.rustup.rs \
| sh -s -- -y --default-toolchain 1.56.1 -c rustfmt -c clippy -c rls

Expand Down
5 changes: 3 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"name": "linkerd2",
"image": "ghcr.io/linkerd/dev:v4",
// "dockerFile": "./Dockerfile",
"image": "ghcr.io/linkerd/dev:v5",
//"dockerFile": "./Dockerfile",
"extensions": [
"DavidAnson.vscode-markdownlint",
"golang.go",
"matklad.rust-analyzer",
"NathanRidley.autotrim",
"samverschueren.final-newline",
Expand Down

0 comments on commit 119dde8

Please sign in to comment.