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

add vscode devcontainer config

parent f6d8b43b
No related branches found
No related tags found
No related merge requests found
FROM ubuntu:bionic
# Set the default shell to bash instead of sh
ENV SHELL /bin/bash
# Update path to include virtualenv
ENV PATH "/usr/local/pyvenv/bin:${PATH}"
# Set locales
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
# Configure apt
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get -y install --no-install-recommends apt-utils 2>&1
# Install git, required tools
RUN apt-get update && \
apt-get install -y \
apt-transport-https \
bash-completion \
build-essential \
ca-certificates \
curl \
git \
gnupg-agent \
libffi-dev \
libssl-dev \
lsb-release \
procps \
python3 \
python3-dev \
python3-venv \
shellcheck \
software-properties-common \
unzip \
vim-tiny \
2>&1
# Configure shell
RUN sed -i 's/#force_color_prompt=yes/force_color_prompt=yes/' /root/.bashrc && \
echo ". /etc/bash_completion" >> /root/.bashrc
# Install Docker CE CLI.
RUN curl -fsSL https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/gpg | apt-key add - 2>/dev/null && \
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable" && \
apt-get update && \
apt-get install -y docker-ce-cli
# Install Poetry
RUN python3 -m venv /usr/local/pyvenv && \
pip install -U pip wheel 2>&1 && \
pip install psutil pyOpenSSL pyspf requests defusedxml 2>&1 && \
pip install black flake8 pre-commit pylint pysnooper 2>&1
# Clean up
RUN apt-get autoremove -y && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/*
ENV DEBIAN_FRONTEND=dialog
{
"name": "envsetup",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspace",
"extensions": [
// editor
"editorconfig.editorconfig",
"mikestead.dotenv",
// python
"ms-python.python",
// docker
"peterjausovec.vscode-docker"
]
}
---
version: '3'
services:
app:
build:
context: ..
dockerfile: .devcontainer/Dockerfile
volumes:
- ..:/workspace
- ~/.config/git/config:/root/.config/git/config
- ~/.config/git/ignore:/root/.config/git/ignore
- ${SSH_AUTH_SOCK}:/ssh-agent
- /var/run/docker.sock:/var/run/docker.sock
environment:
- SSH_AUTH_SOCK=/ssh-agent
working_dir: /workspace
command: sleep infinity
...
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