Skip to content
Snippets Groups Projects
Commit 04929c7c authored by Nicolas KAROLAK's avatar Nicolas KAROLAK
Browse files

update devcontainer

parent dff626f5
No related branches found
No related tags found
No related merge requests found
FROM registry.ubicast.net/docker/debian-dev:buster FROM registry.ubicast.net/docker/debian-dev:latest
# avoid warnings by switching to noninteractive # avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
...@@ -11,15 +11,22 @@ RUN \ ...@@ -11,15 +11,22 @@ RUN \
# install required tools # install required tools
sudo apt-get update && \ sudo apt-get update && \
sudo apt-get install -y \ sudo apt-get install -y \
libffi-dev \ bsd-mailx \
libssl-dev \ python3-defusedxml \
python3-dnspython \
python3-openssl \
python3-psutil \
python3-psycopg2 \
python3-pydbus \
python3-requests \
python3-spf \
&& \ && \
# clean up # clean up
sudo apt-get autoremove -y && \ sudo apt-get autoremove -y && \
sudo apt-get clean -y && \ sudo apt-get clean -y && \
sudo rm -rf /var/lib/apt/lists/* && \ sudo rm -rf /var/lib/apt/lists/* && \
# create pyvenv # create pyvenv
python3 -m venv ${PYVENV} && \ python3 -m venv --system-site-packages ${PYVENV} && \
# update pip tools into pyvenv # update pip tools into pyvenv
pip install -U \ pip install -U \
pip \ pip \
...@@ -28,10 +35,13 @@ RUN \ ...@@ -28,10 +35,13 @@ RUN \
: :
RUN \ RUN \
# requirements
pip install psutil pyOpenSSL pyspf requests defusedxml && \
# dev requirements # dev requirements
pip install black flake8 pre-commit pylint pysnooper && \ pip install \
black \
flake8 \
pylint \
pysnooper \
&& \
: :
# switch back to dialog for any ad-hoc use of apt-get # switch back to dialog for any ad-hoc use of apt-get
......
{ {
"name": "envsetup",
"dockerComposeFile": "docker-compose.yml", "dockerComposeFile": "docker-compose.yml",
"service": "app", "service": "app",
"workspaceFolder": "/workspace", "workspaceFolder": "/workspace",
"postCreateCommand": "bash .devcontainer/scripts/postcreate.sh",
"extensions": [ "extensions": [
// python // python
"ms-python.python", "ms-python.python",
], ],
"settings": { "settings": {
"python.pythonPath": "/home/vscode/pyvenv/bin/python",
"python.formatting.provider": "black",
}, },
} }
#!/usr/bin/env bash
# make the GID match with docker on the host
sudo groupmod -g $(ls -ln /var/run/docker.sock | awk '{ print $4 }') docker
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment