-
Notifications
You must be signed in to change notification settings - Fork 574
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
65ae17f
commit 7ed76d9
Showing
2 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,41 @@ | ||
FROM ubuntu:latest | ||
|
||
ARG USERNAME=user | ||
ARG USER_UID=1000 | ||
ARG USER_GID=$USER_UID | ||
|
||
RUN apt-get update | ||
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
curl \ | ||
flake8 \ | ||
gh \ | ||
git \ | ||
gnupg2 \ | ||
jq \ | ||
libcap-dev \ | ||
libssl-dev \ | ||
pylint \ | ||
python3 \ | ||
python3-dev \ | ||
python3-flake8 \ | ||
python3-pip \ | ||
python3-pycodestyle \ | ||
software-properties-common \ | ||
sudo \ | ||
zsh | ||
|
||
RUN apt-add-repository ppa:deadsnakes/ppa | ||
|
||
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
python2.7 python2.7-dev | ||
|
||
RUN pip install 'tox<4' 'virtualenv<20.22.0' | ||
|
||
RUN groupadd --gid $USER_GID $USERNAME \ | ||
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \ | ||
&& chsh -s /usr/bin/zsh user \ | ||
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ | ||
&& chmod 0440 /etc/sudoers.d/$USERNAME | ||
|
||
USER $USERNAME | ||
WORKDIR /home/$USERNAME |
This file contains 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,34 @@ | ||
{ | ||
"name": "Codespaces Python3", | ||
"extensions": [ | ||
"cschleiden.vscode-github-actions", | ||
"eamodio.gitlens", | ||
"github.vscode-pull-request-github", | ||
"ms-azuretools.vscode-docker", | ||
"ms-python.flake8", | ||
"ms-python.pylint", | ||
"ms-python.python", | ||
"ms-vsliveshare.vsliveshare", | ||
"nwgh.bandit", | ||
"the-compiler.python-tox", | ||
"vscode-icons-team.vscode-icons", | ||
"visualstudioexptteam.vscodeintellicode" | ||
], | ||
"dockerFile": "Dockerfile", | ||
"postCreateCommand": "pip3 install -r requirements.txt", | ||
"remoteEnv": { | ||
"PATH": "${containerEnv:PATH}:/home/user/.local/bin" | ||
}, | ||
"settings": { | ||
"flake8.args": ["--config=setup.cfg"], | ||
"pylint.args": ["--rcfile=setup.cfg"], | ||
"terminal.integrated.shell.linux": "/usr/bin/zsh", | ||
"terminal.integrated.defaultProfile.linux": "zsh", | ||
"terminal.integrated.fontFamily": "'SourceCodePro+Powerline+Awesome Regular'", | ||
"terminal.integrated.fontSize": 14, | ||
"files.exclude": { | ||
"**/CODE_OF_CONDUCT.md": true, | ||
"**/LICENSE": true | ||
} | ||
} | ||
} |