File tree Expand file tree Collapse file tree 5 files changed +64
-2
lines changed
Expand file tree Collapse file tree 5 files changed +64
-2
lines changed Original file line number Diff line number Diff line change 1+ # -------------------------------------------------------------------------------------------------------------
2+ # Copyright (c) Microsoft Corporation. All rights reserved.
3+ # Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
4+ # -------------------------------------------------------------------------------------------------------------
5+
6+ FROM python:3.7
7+
8+ # Avoid warnings by switching to noninteractive
9+ ENV DEBIAN_FRONTEND=noninteractive
10+
11+ # Copy requirements.txt (if found) to a temp locaition so we can install it. Also
12+ # copy "noop.txt" so the COPY instruction does not fail if no requirements.txt exists.
13+ COPY requirements.txt* .devcontainer/noop.txt /tmp/pip-tmp/
14+
15+ # Configure apt and install packages
16+ RUN apt-get update \
17+ && apt-get -y install --no-install-recommends apt-utils 2>&1 \
18+ #
19+ # Verify git, process tools, lsb-release (common in install instructions for CLIs) installed
20+ && apt-get -y install git procps lsb-release \
21+ #
22+ # Install pylint
23+ && pip install pylint \
24+ #
25+ # Update Python environment based on requirements.txt (if presenet)
26+ && if [ -f "/tmp/pip-tmp/requirements.txt" ]; then pip install -r /tmp/pip-tmp/requirements.txt; fi \
27+ && rm -rf /tmp/pip-tmp \
28+ #
29+ # Clean up
30+ && apt-get autoremove -y \
31+ && apt-get clean -y \
32+ && rm -rf /var/lib/apt/lists/*
33+
34+ # Switch back to dialog for any ad-hoc use of apt-get
35+ ENV DEBIAN_FRONTEND=dialog
36+
37+
Original file line number Diff line number Diff line change 1+ // See https://aka.ms/vscode-remote/devcontainer.json for format details.
2+ {
3+ "name" : " Python 3" ,
4+ "context" : " .." ,
5+ "dockerFile" : " Dockerfile" ,
6+
7+ // Uncomment the next line if you want to publish any ports.
8+ // "appPort": [],
9+
10+ // Uncomment the next line to run commands after the container is created.
11+ // "postCreateCommand": "python --version",
12+
13+ "extensions" : [
14+ " ms-python.python"
15+ ],
16+ "settings" : {
17+ "python.pythonPath" : " /usr/local/bin/python" ,
18+ "python.linting.pylintEnabled" : true ,
19+ "python.linting.enabled" : true
20+ }
21+ }
Original file line number Diff line number Diff line change 1+ This file is copied into the container along with requirements.txt* from the
2+ parent folder. This is done to prevent the Dockerfile COPY instruction from
3+ failing if no requirements.txt is found.
Original file line number Diff line number Diff line change @@ -113,4 +113,5 @@ venv.bak/
113113dmypy.json
114114
115115# Pyre type checker
116- .pyre /
116+ .pyre /
117+ .DS_Store
Original file line number Diff line number Diff line change 1414 install_requires = REQUIRES ,
1515 packages = find_packages (),
1616 license = "Apache License, Version 2.0" ,
17- python_requires = ">=3.5 " ,
17+ python_requires = ">=3.7 " ,
1818 classifiers = [
1919 "Intended Audience :: Developers" ,
2020 "Natural Language :: English" ,
You can’t perform that action at this time.
0 commit comments