1
0
mirror of https://gitlab.com/simple-stock-bots/simple-discord-stock-bot.git synced 2025-06-16 07:16:41 +00:00

embracing the devcontainers

This commit is contained in:
Anson 2021-08-15 17:48:50 -07:00
parent f434fa7c6f
commit c6db51a5cc
4 changed files with 53 additions and 3 deletions

View File

@ -0,0 +1,25 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.191.0/containers/docker-existing-dockerfile
{
"name": "DockerDev",
// 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",
// 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"
]
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Uncomment the next line to run commands after the container is created - for example installing curl.
// "postCreateCommand": "apt-get update && apt-get install -y curl",
// Uncomment when using a ptrace-based debugger like C++, Go, and Rust
// "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
// Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker.
// "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ],
// Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root.
// "remoteUser": "vscode"
}

4
.gitignore vendored
View File

@ -1,3 +1 @@
.vscode/settings.json __pycache__
__pycache__
.devcontainer

20
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,20 @@
{
"workbench.iconTheme": "vscode-icons",
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"python.languageServer": "Pylance",
"git.autofetch": true,
"editor.formatOnSave": true,
"files.associations": {
"DockerDev": "dockerfile",
},
"workbench.colorTheme": "One Dark Pro",
"explorer.confirmDelete": false,
"editor.fontFamily": "JetBrains Mono",
"editor.letterSpacing": 1.2,
"editor.fontLigatures": true,
"editor.wordWrap": "on",
"python.formatting.provider": "black",
"python.showStartPage": false,
"editor.fontSize": 13,
}

7
DockerDev Normal file
View File

@ -0,0 +1,7 @@
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 . .