Skip to content
This repository was archived by the owner on Nov 30, 2023. It is now read-only.

Commit 6f0f87e

Browse files
authored
Merge pull request #13 from qubitron/master
Updating Python dev container definitions
2 parents df25b4f + d1ffc8a commit 6f0f87e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+239
-272
lines changed

containers/python-2/.devcontainer/Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,19 @@
33
# Licensed under the MIT License. See LICENSE in the project root for license information.
44
#-----------------------------------------------------------------------------------------
55

6-
FROM python:2-slim
6+
FROM python:2
77

88
# Copy endpoint specific user settings overrides into container to specify Python path
9-
COPY settings.vscode.json /root/.vscode-remote/data/Machine/settings.json
9+
COPY .devcontainer/settings.vscode.json /root/.vscode-remote/data/Machine/settings.json
1010

1111
RUN pip install pylint
1212

1313
# Install git, process tools
1414
RUN apt-get update && apt-get -y install git procps
1515

16-
# Install any missing dependencies for enhanced language service
17-
RUN apt-get install -y libicu57
16+
# Install Python dependencies from requirements.txt if it exists
17+
COPY .devcontainer/requirements.txt.temp requirements.txt* /workspace/
18+
RUN if [ -f "requirements.txt" ]; then pip install -r requirements.txt && rm requirements.txt*; fi
1819

1920
# Clean up
2021
RUN apt-get autoremove -y \
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
{
22
"name": "Python 2",
3+
"context": "..",
34
"dockerFile": "Dockerfile",
5+
"workspaceFolder": "/workspace",
46
"extensions": [
57
"ms-python.python",
6-
"LittleFoxTeam.vscode-python-test-adapter"
8+
"VisualStudioExptTeam.vscodeintellicode"
79
]
810
}
File renamed without changes.

containers/python-2/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Summary
44

5-
*A basic dev container definition for developing Python 2 applications in a container. Includes everything you need to get up and running like PyLint and the Python extension.*
5+
*A basic dev container definition for developing Python 2 applications in a container. Installs dependencies from your requirements.txt file and the Python extension.*
66

77
| Metadata | Value |
88
|----------|-------|

containers/python-3-flask-redis/.devcontainer/Dockerfile renamed to containers/python-3-anaconda/.devcontainer/Dockerfile

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,23 @@
33
# Licensed under the MIT License. See LICENSE in the project root for license information.
44
#-----------------------------------------------------------------------------------------
55

6-
FROM python:3
6+
FROM continuumio/anaconda3
77

88
# Copy default endpoint specific user settings overrides into container to specify Python path
9-
COPY settings.vscode.json /root/.vscode-remote/data/Machine/settings.json
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
1013

1114
RUN mkdir /workspace
1215
WORKDIR /workspace
1316

14-
# Install pylint, flask, redis
15-
COPY requirements.txt /workspace/
16-
RUN pip install -r requirements.txt && rm -f requirements.txt
17-
18-
# Install git
19-
RUN apt-get update && apt-get -y install git
20-
21-
# Install any missing dependencies for enhanced language service
22-
RUN apt-get install -y libicu[0-9][0-9]
17+
# Install Python dependencies from requirements.txt if it exists
18+
COPY .devcontainer/environment.yml.temp environment.yml* /workspace/
19+
RUN if [ -f "environment.yml" ]; then conda env update base -f environment.yml && rm environment.yml*; fi
2320

2421
# Clean up
2522
RUN apt-get autoremove -y \
2623
&& apt-get clean -y \
2724
&& rm -rf /var/lib/apt/lists/*
25+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "Python 3 - Anaconda",
3+
"context": "..",
4+
"dockerFile": "Dockerfile",
5+
"appPort": "5000:5000",
6+
"workspaceFolder": "/workspace",
7+
"extensions": [
8+
"ms-python.python",
9+
"VisualStudioExptTeam.vscodeintellicode"
10+
]
11+
}
File renamed without changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"python.pythonPath": "/opt/conda/bin/python"
3+
}
File renamed without changes.
Lines changed: 15 additions & 0 deletions
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+
}

0 commit comments

Comments
 (0)