From 342392b604d64b5a0d1fecac2c6df31d8e250d5a Mon Sep 17 00:00:00 2001 From: Anson Date: Tue, 4 Jan 2022 20:54:15 -0700 Subject: [PATCH] add devcontainer stuff from telegram bot --- .devcontainer/Dockerfile | 24 ++++++++++++++++++++++++ .devcontainer/devcontainer.json | 5 +++-- DockerDev | 7 ------- 3 files changed, 27 insertions(+), 9 deletions(-) create mode 100644 .devcontainer/Dockerfile delete mode 100644 DockerDev diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..04540b2 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,24 @@ +FROM python:3.9-buster AS builder + + +COPY requirements.txt /requirements.txt +RUN pip install --user -r requirements.txt + + +FROM python:3.9-slim + +ENV MPLBACKEND=Agg + +COPY --from=builder /root/.local /root/.local + +# Formatting +RUN pip install --no-cache-dir black +# Jupyter Notebooks +RUN pip install --no-cache-dir ipykernel + +ENV DISCORD=TOKEN +ENV IEX=TOKEN + +COPY . . + +# CMD [ "python", "./bot.py" ] diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 1587f43..de09b46 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -5,12 +5,13 @@ // Sets the run context to one level up instead of the .devcontainer folder. "context": "..", // Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename. - "dockerFile": "../DockerDev", + "dockerFile": "Dockerfile", // Set *default* container specific settings.json values on container create. "settings": {}, // Add the IDs of extensions you want installed when the container is created. "extensions": [ - "ms-python.python" + "ms-python.python", + "ms-azuretools.vscode-docker" ] // Use 'forwardPorts' to make a list of ports inside the container available locally. // "forwardPorts": [], diff --git a/DockerDev b/DockerDev deleted file mode 100644 index ab818c3..0000000 --- a/DockerDev +++ /dev/null @@ -1,7 +0,0 @@ -FROM python:3.9-buster - -COPY requirements.txt ./ -RUN pip install --no-cache-dir -r requirements.txt -RUN pip install --no-cache-dir black -COPY . . -