Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM swiftlang/swift:nightly-jammy

COPY ../nvmrc /tmp/.nvmrc
COPY .nvmrc /tmp/.nvmrc

# python3-lldb-13 is only needed for swiftly and a great dep to remove to test post-install script ;)
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
Expand All @@ -20,11 +20,11 @@ RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
RUN mkdir -p /usr/local/nvm
ENV NVM_DIR /usr/local/nvm
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
ARG NODE_VERSION
RUN NODE_VERSION=$(cat /tmp/.nvmrc) && \
/bin/bash -c "source $NVM_DIR/nvm.sh && nvm install $NODE_VERSION"
ENV NODE_PATH $NVM_DIR/versions/node/$NODE_VERSION/bin
ENV PATH $NODE_PATH:$PATH
RUN /bin/bash -c "source $NVM_DIR/nvm.sh && \
NODE_VERSION=\$(cat /tmp/.nvmrc) && \
nvm install \$NODE_VERSION && \
ln -sf \$NVM_DIR/versions/node/v\$NODE_VERSION \$NVM_DIR/current"
ENV PATH $NVM_DIR/current/bin:$PATH
RUN npm -v
RUN node -v

Expand Down
5 changes: 4 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"name": "Swift",
"dockerFile": "Dockerfile",
"build": {
"dockerfile": "Dockerfile",
"context": ".."
},
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": "false",
Expand Down