1
0
mirror of https://gitlab.com/simple-stock-bots/simple-discord-stock-bot.git synced 2025-08-01 19:11:34 +00:00

add devcontainer stuff from telegram bot

This commit is contained in:
2022-01-04 20:54:15 -07:00
parent 7e05e2dbec
commit 342392b604
3 changed files with 27 additions and 9 deletions

24
.devcontainer/Dockerfile Normal file
View File

@@ -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" ]

View File

@@ -5,12 +5,13 @@
// Sets the run context to one level up instead of the .devcontainer folder. // Sets the run context to one level up instead of the .devcontainer folder.
"context": "..", "context": "..",
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename. // 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. // Set *default* container specific settings.json values on container create.
"settings": {}, "settings": {},
// Add the IDs of extensions you want installed when the container is created. // Add the IDs of extensions you want installed when the container is created.
"extensions": [ "extensions": [
"ms-python.python" "ms-python.python",
"ms-azuretools.vscode-docker"
] ]
// Use 'forwardPorts' to make a list of ports inside the container available locally. // Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [], // "forwardPorts": [],

View File

@@ -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 . .