forked from sledilnik/website
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Andraz Vrhovec
committed
Oct 11, 2020
1 parent
c39668a
commit b84b59a
Showing
5 changed files
with
112 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# [Choice] .NET Core version: 3.1, 2.1 | ||
ARG VARIANT=3.1 | ||
FROM mcr.microsoft.com/vscode/devcontainers/dotnetcore:dev-${VARIANT} | ||
|
||
# [Option] Install Node.js | ||
ARG INSTALL_NODE="true" | ||
ARG NODE_VERSION="lts/*" | ||
RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi | ||
|
||
# [Option] Install Azure CLI | ||
ARG INSTALL_AZURE_CLI="false" | ||
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 |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"name": "F# (.NET Core)", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"args": { | ||
// Update 'VARIANT' to pick a .NET Core version: 2.1, 3.1 | ||
"VARIANT": "3.1", | ||
// Options | ||
"INSTALL_NODE": "true", | ||
"NODE_VERSION": "lts/*", | ||
"INSTALL_AZURE_CLI": "false", | ||
"UPGRADE_PACKAGES": "false" | ||
} | ||
}, | ||
|
||
// Set container specific defaults for F# in .NET Core 2.1+ | ||
"settings": { | ||
"terminal.integrated.shell.linux": "/bin/bash", | ||
"FSharp.fsacRuntime": "netcore", | ||
"FSharp.useSdkScripts": true | ||
}, | ||
|
||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": [ | ||
"Ionide.Ionide-fsharp", | ||
"ms-dotnettools.csharp", | ||
"octref.vetur" | ||
], | ||
|
||
// 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": "dotnet restore && yarn install", | ||
|
||
// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root. | ||
"remoteUser": "vscode" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env bash | ||
#------------------------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. | ||
#------------------------------------------------------------------------------------------------------------- | ||
# | ||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/master/script-library/docs/azcli.md | ||
# | ||
# Syntax: ./azcli-debian.sh | ||
|
||
set -e | ||
|
||
if [ "$(id -u)" -ne 0 ]; then | ||
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.' | ||
exit 1 | ||
fi | ||
|
||
export DEBIAN_FRONTEND=noninteractive | ||
|
||
# Install curl, apt-transport-https, lsb-release, or gpg if missing | ||
if ! dpkg -s apt-transport-https curl ca-certificates lsb-release > /dev/null 2>&1 || ! type gpg > /dev/null 2>&1; then | ||
if [ ! -d "/var/lib/apt/lists" ] || [ "$(ls /var/lib/apt/lists/ | wc -l)" = "0" ]; then | ||
apt-get update | ||
fi | ||
apt-get -y install --no-install-recommends apt-transport-https curl ca-certificates lsb-release gnupg2 | ||
fi | ||
|
||
# Install the Azure CLI | ||
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 | (OUT=$(apt-key add - 2>&1) || echo $OUT) | ||
apt-get update | ||
apt-get install -y azure-cli | ||
echo "Done!" |
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 |
---|---|---|
|
@@ -12,7 +12,6 @@ yarn-debug.log* | |
yarn-error.log* | ||
|
||
# Editor directories and files | ||
.vscode | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
|
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"type": "npm", | ||
"script": "serve", | ||
"problemMatcher": [], | ||
"label": "npm: serve", | ||
"detail": "vue-cli-service serve" | ||
}, | ||
{ | ||
"type": "npm", | ||
"script": "build", | ||
"group": "build", | ||
"problemMatcher": [], | ||
"label": "npm: build", | ||
"detail": "vue-cli-service build" | ||
} | ||
] | ||
} |