Add initial support for remote dev container (#24681)
* Add initial support for remote container * Use constrain
This commit is contained in:
parent
dc6a44d0eb
commit
a807572382
3 changed files with 32 additions and 1 deletions
17
.devcontainer/Dockerfile
Normal file
17
.devcontainer/Dockerfile
Normal 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
|
15
.devcontainer/devcontainer.json
Normal file
15
.devcontainer/devcontainer.json
Normal 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
1
.gitignore
vendored
|
@ -95,7 +95,6 @@ virtualization/vagrant/config
|
|||
|
||||
# Visual Studio Code
|
||||
.vscode
|
||||
.devcontainer
|
||||
|
||||
# Built docs
|
||||
docs/build
|
||||
|
|
Loading…
Add table
Reference in a new issue