Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Update dev container for swift #1238

Merged
merged 7 commits into from
Jan 11, 2022
Merged
Show file tree
Hide file tree
Changes from 5 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
7 changes: 0 additions & 7 deletions containers/swift/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,8 @@ ARG USER_GID=$USER_UID
COPY library-scripts/common-debian.sh /tmp/library-scripts/
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& /bin/bash /tmp/library-scripts/common-debian.sh "${INSTALL_ZSH}" "${USERNAME}" "${USER_UID}" "${USER_GID}" "${UPGRADE_PACKAGES}" "true" "true" \
&& apt-get -y install --no-install-recommends lldb python3-minimal libpython3.7 \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 swift docker images install a later version of python.

&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* && rm -rf /tmp/library-scripts

# Install SourceKite, see https://github.com/vknabel/vscode-swift-development-environment/blob/master/README.md#installation
RUN git clone https://github.com/vknabel/sourcekite \
&& export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/swift:/usr/lib \
&& ln -s /usr/lib/libsourcekitdInProc.so /usr/lib/sourcekitdInProc \
&& cd sourcekite && make install PREFIX=/usr/local -j2

# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
ARG NODE_VERSION="none"
ENV NVM_DIR=/usr/local/share/nvm
Expand Down
13 changes: 4 additions & 9 deletions containers/swift/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,19 @@
],

// Set *default* container specific settings.json values on container create.
"settings": {
"lldb.adapterType": "bundled",
"lldb.executable": "/usr/bin/lldb",
"sde.languageservermode": "sourcekite",
"swift.path.sourcekite": "/usr/local/bin/sourcekite"
},
"settings": { },

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"vknabel.vscode-swift-development-environment",
"vadimcn.vscode-lldb"
"sswg.swift-lang",
"vadimcn.vscode-lldb",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not required as it's pulled in automatically by sswg.swift-lang

],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "swiftc --version",
// "postCreateCommand": "",

// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
Expand Down