Skip to content

Commit

Permalink
Add initial support for remote dev container (home-assistant#24681)
Browse files Browse the repository at this point in the history
* Add initial support for remote container

* Use constrain
  • Loading branch information
pvizeli authored and balloob committed Jun 23, 2019
1 parent dc6a44d commit a807572
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 changes: 15 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -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 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ virtualization/vagrant/config

# Visual Studio Code
.vscode
.devcontainer

# Built docs
docs/build
Expand Down

0 comments on commit a807572

Please sign in to comment.