From 46daf80f8429a84875c335368559951706e7b97f Mon Sep 17 00:00:00 2001 From: gfritz Date: Mon, 19 Aug 2019 18:38:08 -0400 Subject: [PATCH] add devcontainer to isolate dotnet sdk 3 preview --- .devcontainer/Dockerfile | 31 +++++++++++++++++++++++++++++++ .devcontainer/devcontainer.json | 19 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 00000000..87a69248 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,31 @@ +#------------------------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. +#------------------------------------------------------------------------------------------------------------- + +FROM mcr.microsoft.com/dotnet/core/sdk:3.0 + +# Avoid warnings by switching to noninteractive +ENV DEBIAN_FRONTEND=noninteractive + +# Configure apt and install packages +RUN apt-get update \ + && apt-get -y install --no-install-recommends apt-utils 2>&1 \ + # + # Verify git, process tools, lsb-release (common in install instructions for CLIs) installed + && apt-get -y install git procps lsb-release \ + # + # Clean up + && apt-get autoremove -y \ + && apt-get clean -y \ + && rm -rf /var/lib/apt/lists/* + +# Install fake and paket +RUN dotnet tool install -g fake-cli \ + && dotnet tool install -g paket + +# add dotnet tools to path to pick up fake and paket installation +ENV PATH="${PATH}:/root/.dotnet/tools" + +# Switch back to dialog for any ad-hoc use of apt-get +ENV DEBIAN_FRONTEND=dialog diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..89a49b2d --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,19 @@ +// See https://aka.ms/vscode-remote/devcontainer.json for format details. +{ + "name": "F# (.NET Core Latest)", + "dockerFile": "Dockerfile", + + // Uncomment the next line if you want to publish any ports. + // "appPort": [], + + // Uncomment the next line to run commands after the container is created. + // "postCreateCommand": "dotnet restore", + + "extensions": [ + "Ionide.Ionide-fsharp", + "ms-vscode.csharp" + ], + "settings": { + "FSharp.fsacRuntime":"netcore" + } +} \ No newline at end of file