Add initial support for remote dev container (#24681)

* Add initial support for remote container

* Use constrain
This commit is contained in:
Pascal Vizeli 2019-06-23 21:18:33 +02:00 committed by Paulus Schoutsen
parent dc6a44d0eb
commit a807572382
3 changed files with 32 additions and 1 deletions

17
.devcontainer/Dockerfile Normal file
View file

@ -0,0 +1,17 @@
FROM python:3.7
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libudev-dev libavformat-dev libavcodec-dev libavdevice-dev \
libavutil-dev libswscale-dev libswresample-dev libavfilter-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /workspace
# Install Python dependencies from requirements.txt if it exists
COPY requirements_test_all.txt homeassistant/package_constraints.txt /workspace/
RUN pip3 install -r requirements_test_all.txt -c package_constraints.txt
# Set the default shell to bash instead of sh
ENV SHELL /bin/bash

View file

@ -0,0 +1,15 @@
// See https://aka.ms/vscode-remote/devcontainer.json for format details.
{
"name": "Home Assistant Dev",
"context": "..",
"dockerFile": "Dockerfile",
"postCreateCommand": "pip3 install -e .",
"extensions": [
"ms-python.python"
],
"settings": {
"python.pythonPath": "/usr/local/bin/python",
"python.linting.pylintEnabled": true,
"python.linting.enabled": true
}
}

1
.gitignore vendored
View file

@ -95,7 +95,6 @@ virtualization/vagrant/config
# Visual Studio Code
.vscode
.devcontainer
# Built docs
docs/build