Skip to content

Commit

Permalink
install plugins/templates as the vscode user
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Pflueger committed Oct 16, 2023
1 parent b1c4841 commit 898e2df
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ FROM mcr.microsoft.com/devcontainers/base:jammy

# provided by docker
ARG TARGETARCH
ARG USERNAME=vscode
ARG USER_UID=1000
ARG USER_GID=$USER_UID

RUN apt-get update && apt-get install -y \
nodejs \
Expand All @@ -24,8 +27,11 @@ ARG SPIN_VERSION="v1.5.0"
ENV PATH="$PATH:/usr/local/spin"
RUN mkdir -p /usr/local/spin && \
cd /usr/local/spin && \
curl -fsSL https://developer.fermyon.com/downloads/install.sh | bash -s -- -v $SPIN_VERSION && \
spin plugins update && \
curl -fsSL https://developer.fermyon.com/downloads/install.sh | bash -s -- -v $SPIN_VERSION

# Set the current user before spin install for plugins/templates
USER $USERNAME
RUN spin plugins update && \
spin plugins install check-for-update -y && \
spin plugins install cloud -y && \
spin plugins install js2wasm -y && \
Expand Down
4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"dockerfile": "Dockerfile"
},
"features": {
}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
Expand All @@ -20,5 +20,5 @@
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
"remoteUser": "vscode"
}

0 comments on commit 898e2df

Please sign in to comment.