Skip to content

Commit 7de7a10

Browse files
committed
Initial
1 parent 59c0857 commit 7de7a10

9 files changed

+83
-1
lines changed

.devcontainer/Dockerfile

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#-----------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See LICENSE in the project root for license information.
4+
#-----------------------------------------------------------------------------------------
5+
6+
FROM python:3
7+
8+
# Copy default endpoint specific user settings overrides into container to specify Python path
9+
COPY .devcontainer/settings.vscode.json /root/.vscode-remote/data/Machine/settings.json
10+
11+
# Install git, process tools
12+
RUN apt-get update && apt-get -y install git procps
13+
14+
# Install any missing dependencies for enhanced language service
15+
RUN apt-get install -y libicu[0-9][0-9]
16+
17+
RUN mkdir /workspace
18+
WORKDIR /workspace
19+
20+
# Install Python dependencies from requirements.txt if it exists
21+
COPY .devcontainer/requirements.txt.temp requirements.txt* /workspace/
22+
RUN if [ -f "requirements.txt" ]; then pip install -r requirements.txt && rm requirements.txt*; fi
23+
24+
# Expose port 5000 as the default web port
25+
EXPOSE 5000
26+
27+
# Clean up
28+
RUN apt-get autoremove -y \
29+
&& apt-get clean -y \
30+
&& rm -rf /var/lib/apt/lists/*

.devcontainer/devcontainer.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "Python Sample",
3+
"dockerFile": "Dockerfile",
4+
"context": "..",
5+
"extensions": [
6+
"ms-python.python",
7+
"VisualStudioExptTeam.vscodeintellicode"
8+
]
9+
}

.devcontainer/requirements.txt.temp

Whitespace-only changes.

.devcontainer/settings.vscode.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"python.pythonPath": "/usr/local/bin/python"
3+
}

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -328,3 +328,5 @@ ASALocalRun/
328328

329329
# MFractors (Xamarin productivity tool) working folder
330330
.mfractor/
331+
332+
*.DS_Store

.vscode/launch.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Python: Current File (Integrated Terminal)",
9+
"type": "python",
10+
"request": "launch",
11+
"program": "${file}",
12+
"console": "integratedTerminal"
13+
}
14+
]
15+
}

.vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"python.jediEnabled": false
3+
}

README.md

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1+
# Python Sample Project for Visual Studio Remote - Containers
12

2-
# Contributing
3+
This is a sample project to go along with the "try" quick start for the VS Code Remote - Containers extension.
4+
5+
See [https://aka.ms/vsocde-remote/containers/getting-started](https://aka.ms/vsocde-remote/containers/getting-started) for details.
6+
7+
Other samples that include dev containers for Python:
8+
- [Python 3 - Anaconda](https://github.com/Microsoft/python-sample-anacondacontainer)
9+
- [Tweeter App - Python and Django](https://github.com/Microsoft/python-sample-tweeterapp)
10+
11+
## Contributing
312

413
This project welcomes contributions and suggestions. Most contributions require you to agree to a
514
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
@@ -12,3 +21,8 @@ provided by the bot. You will only need to do this once across all repos using o
1221
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
1322
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
1423
contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
24+
25+
## License
26+
27+
Copyright © Microsoft Corporation All rights reserved.<br />
28+
Licensed under the MIT License. See LICENSE in the project root for license information.

hello.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#-----------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See LICENSE in the project root for license information.
4+
#-----------------------------------------------------------------------------------------
5+
6+
print('Hello, remote world!')

0 commit comments

Comments
 (0)