This repository has been archived by the owner on Nov 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch F# to use pre-built image (CI Ignore)
- Loading branch information
Showing
3 changed files
with
29 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,20 @@ | ||
# Update the VARIANT arg in devcontainer.json to pick a .NET Core version: 3.1-bionic, 2.1-bionic | ||
ARG VARIANT="3.1-bionic" | ||
FROM mcr.microsoft.com/dotnet/core/sdk:${VARIANT} | ||
ARG VARIANT=3.1 | ||
FROM mcr.microsoft.com/vscode/devcontainers/dotnetcore:dev-${VARIANT} | ||
|
||
# Options for setup script | ||
ARG INSTALL_ZSH="true" | ||
ARG UPGRADE_PACKAGES="false" | ||
ARG USERNAME=vscode | ||
ARG USER_UID=1000 | ||
ARG USER_GID=$USER_UID | ||
|
||
# Install needed packages and setup non-root user. Use a separate RUN statement to add your own dependencies. | ||
COPY library-scripts/common-debian.sh /tmp/library-scripts/ | ||
RUN apt-get update \ | ||
&& /bin/bash /tmp/library-scripts/common-debian.sh "${INSTALL_ZSH}" "${USERNAME}" "${USER_UID}" "${USER_GID}" "${UPGRADE_PACKAGES}" \ | ||
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* && rm -rf /tmp/library-scripts | ||
|
||
# [Optional] Install Node.js for use with web applications - update the INSTALL_NODE arg in devcontainer.json to enable. | ||
ARG INSTALL_NODE="false" | ||
# [Optional] Install a version of Node.js using nvm for front end dev | ||
ARG INSTALL_NODE="true" | ||
ARG NODE_VERSION="lts/*" | ||
ENV NVM_DIR=/usr/local/share/nvm | ||
ENV NVM_SYMLINK_CURRENT=true \ | ||
PATH=${NVM_DIR}/current/bin:${PATH} | ||
COPY library-scripts/node-debian.sh /tmp/library-scripts/ | ||
RUN if [ "$INSTALL_NODE" = "true" ]; then /bin/bash /tmp/library-scripts/node-debian.sh "${NVM_DIR}" "${NODE_VERSION}" "${USERNAME}"; fi \ | ||
&& rm -rf /var/lib/apt/lists/* /tmp/library-scripts | ||
RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi | ||
|
||
# [Optional] Install the Azure CLI - update the INSTALL_AZURE_CLI arg in devcontainer.json to enable. | ||
ARG INSTALL_AZURE_CLI="false" | ||
RUN if [ "$INSTALL_AZURE_CLI" = "true" ]; then \ | ||
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 | apt-key add - 2>/dev/null \ | ||
&& apt-get update \ | ||
&& apt-get install -y azure-cli \ | ||
&& rm -rf /var/lib/apt/lists/*; \ | ||
fi | ||
COPY library-scripts/azcli-debian.sh /tmp/library-scripts/ | ||
RUN if [ "$INSTALL_AZURE_CLI" = "true" ]; then bash /tmp/library-scripts/azcli-debian.sh; fi \ | ||
&& rm -rf /var/lib/apt/lists/* /tmp/library-scripts | ||
|
||
# [Optional] Uncomment this section to install additional OS packages. | ||
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
# && apt-get -y install --no-install-recommends <your-package-list-here> | ||
|
||
# [Optional] Uncomment this line to install global node packages. | ||
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1 | ||
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters