Pamela Fox
commited on
Commit
·
ba558e6
1
Parent(s):
3c29f1d
Add devcontainer
Browse files- .devcontainer/Dockerfile +5 -0
- .devcontainer/devcontainer.json +59 -0
- README.md +2 -0
.devcontainer/Dockerfile
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.245.0/containers/python-3/.devcontainer/base.Dockerfile
|
2 |
+
|
3 |
+
# [Choice] Python version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.10, 3.9, 3.8, 3.7, 3.6, 3-bullseye, 3.10-bullseye, 3.9-bullseye, 3.8-bullseye, 3.7-bullseye, 3.6-bullseye, 3-buster, 3.10-buster, 3.9-buster, 3.8-buster, 3.7-buster, 3.6-buster
|
4 |
+
ARG VARIANT="3.10-bullseye"
|
5 |
+
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}
|
.devcontainer/devcontainer.json
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
|
2 |
+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.0/containers/python-3
|
3 |
+
{
|
4 |
+
"name": "Python 3",
|
5 |
+
"forwardPorts": [8000],
|
6 |
+
"build": {
|
7 |
+
"dockerfile": "Dockerfile",
|
8 |
+
"context": "..",
|
9 |
+
"args": {
|
10 |
+
// Update 'VARIANT' to pick a Python version: 3, 3.10, 3.9, 3.8, 3.7, 3.6
|
11 |
+
// Append -bullseye or -buster to pin to an OS version.
|
12 |
+
// Use -bullseye variants on local on arm64/Apple Silicon.
|
13 |
+
"VARIANT": "3.10-bullseye"
|
14 |
+
}
|
15 |
+
},
|
16 |
+
|
17 |
+
// Configure tool-specific properties.
|
18 |
+
"customizations": {
|
19 |
+
// Configure properties specific to VS Code.
|
20 |
+
"vscode": {
|
21 |
+
// Set *default* container specific settings.json values on container create.
|
22 |
+
"settings": {
|
23 |
+
"python.defaultInterpreterPath": "/usr/local/bin/python",
|
24 |
+
"python.linting.enabled": true,
|
25 |
+
"python.linting.pylintEnabled": true,
|
26 |
+
"python.linting.pylintArgs": [
|
27 |
+
"--disable=C0114,C0115,C0116"
|
28 |
+
],
|
29 |
+
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
|
30 |
+
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
|
31 |
+
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
|
32 |
+
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
|
33 |
+
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
|
34 |
+
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
|
35 |
+
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
|
36 |
+
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
|
37 |
+
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint",
|
38 |
+
"python.testing.unittestEnabled": false,
|
39 |
+
"python.testing.pytestEnabled": true,
|
40 |
+
"workbench.startupEditor": "newUntitledFile"
|
41 |
+
},
|
42 |
+
|
43 |
+
// Add the IDs of extensions you want installed when the container is created.
|
44 |
+
"extensions": [
|
45 |
+
"ms-python.python",
|
46 |
+
"ms-python.vscode-pylance"
|
47 |
+
]
|
48 |
+
}
|
49 |
+
},
|
50 |
+
|
51 |
+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
52 |
+
// "forwardPorts": [],
|
53 |
+
|
54 |
+
// Use 'postCreateCommand' to run commands after the container is created.
|
55 |
+
"postCreateCommand": "pip install -r requirements-dev.txt",
|
56 |
+
|
57 |
+
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
|
58 |
+
"remoteUser": "vscode"
|
59 |
+
}
|
README.md
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
# Quizzes app
|
2 |
|
3 |
An example Django app that serves quizzes and lets people know how they scored.
|
|
|
1 |
+
[](https://github.com/codespaces/new?hide_repo_select=true&repo=pamelafox%2Fdjango-quiz-app)
|
2 |
+
|
3 |
# Quizzes app
|
4 |
|
5 |
An example Django app that serves quizzes and lets people know how they scored.
|