Add ability to open repo in a remote container.

This commit is contained in:
N. Taylor Mullen 2019-05-08 22:31:44 -07:00
Родитель b9c69031a7
Коммит e82a608a8d
2 изменённых файлов: 43 добавлений и 0 удалений

34
.devcontainer/Dockerfile Normal file
Просмотреть файл

@ -0,0 +1,34 @@
#-------------------------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
#-------------------------------------------------------------------------------------------------------------
FROM node:8-slim
# Configure apt
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get -y install --no-install-recommends apt-utils 2>&1
# Verify git and needed tools are installed
RUN apt-get install -y git procps
# Remove outdated yarn from /opt and install via package
# so it can be easily updated via apt-get upgrade yarn
RUN rm -rf /opt/yarn-* \
rm -f /usr/local/bin/yarn \
rm -f /usr/local/bin/yarnpkg \
&& apt-get install -y curl apt-transport-https lsb-release \
&& curl -sS https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/pubkey.gpg | apt-key add - 2>/dev/null \
&& echo "deb https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt-get update \
&& apt-get -y install --no-install-recommends yarn
# Install tslint and typescript
RUN npm install -g tslint typescript
# Clean up
RUN apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
ENV DEBIAN_FRONTEND=dialog

Просмотреть файл

@ -0,0 +1,9 @@
// See https://aka.ms/vscode-remote/containers for the
// documentation about the devcontainer.json format
{
"name": "Extension Development",
"dockerFile": "Dockerfile",
"extensions": [
"ms-vscode.vscode-typescript-tslint-plugin"
]
}