-
-
Notifications
You must be signed in to change notification settings - Fork 46.8k
Add Docker devcontainer configuration files #8887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
e33a316
Added Docker container configuration files
HManiac74 85bcbe5
Update Dockerfile
HManiac74 c8df99c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] b3a9856
Merge branch 'TheAlgorithms:master' into master
HManiac74 5c291eb
Updated Docker devcontainer configuration
HManiac74 e31f0b7
Update requierements.txt
HManiac74 e786195
Update Dockerfile
HManiac74 b914e0d
Update Dockerfile
HManiac74 e7f6505
Update .devcontainer/devcontainer.json
HManiac74 79b58a5
Update Dockerfile
HManiac74 84d00b5
Update Dockerfile. Add linebreak
HManiac74 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# https://github.com/microsoft/vscode-dev-containers/blob/main/containers/python-3/README.md | ||
ARG VARIANT=3.11-bookworm | ||
FROM mcr.microsoft.com/vscode/devcontainers/python:${VARIANT} | ||
COPY requirements.txt /tmp/pip-tmp/ | ||
RUN python3 -m pip install --upgrade pip \ | ||
&& python3 -m pip install --no-cache-dir install ruff -r /tmp/pip-tmp/requirements.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"name": "Python 3", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"context": "..", | ||
"args": { | ||
// Update 'VARIANT' to pick a Python version: 3, 3.10, 3.9, 3.8, 3.7, 3.6 | ||
// Append -bullseye or -buster to pin to an OS version. | ||
// Use -bullseye variants on local on arm64/Apple Silicon. | ||
HManiac74 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"VARIANT": "3.11-bookworm", | ||
} | ||
}, | ||
|
||
// Configure tool-specific properties. | ||
"customizations": { | ||
// Configure properties specific to VS Code. | ||
"vscode": { | ||
// Set *default* container specific settings.json values on container create. | ||
"settings": { | ||
"python.defaultInterpreterPath": "/usr/local/bin/python", | ||
"python.linting.enabled": true, | ||
"python.formatting.blackPath": "/usr/local/py-utils/bin/black", | ||
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy" | ||
}, | ||
|
||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": [ | ||
"ms-python.python", | ||
"ms-python.vscode-pylance" | ||
] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In a future PR, it would be cool to add... https://github.com/astral-sh/ruff-vscode |
||
} | ||
}, | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
// "postCreateCommand": "pip3 install --user -r requirements.txt", | ||
|
||
cclauss marked this conversation as resolved.
Show resolved
Hide resolved
|
||
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. | ||
"remoteUser": "vscode" | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.