Skip to content
This repository was archived by the owner on Mar 31, 2026. It is now read-only.

Commit a8fb395

Browse files
authored
chore: dev containers (#969)
* chore: dev containers * fix: review comments
1 parent 35c7a36 commit a8fb395

5 files changed

Lines changed: 71 additions & 0 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
ARG VARIANT="3.8"
2+
FROM mcr.microsoft.com/devcontainers/python:${VARIANT}
3+
4+
#install nox
5+
COPY requirements.txt /requirements.txt
6+
RUN python3 -m pip install --upgrade --quiet --require-hashes -r requirements.txt
7+
8+
# install gh
9+
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
10+
&& chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
11+
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
12+
&& apt-get update \
13+
&& apt-get install gh -y
14+
15+
# install gloud sdk
16+
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && apt-get update -y && apt-get install google-cloud-cli -y

.devcontainer/devcontainer.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/python
3+
{
4+
"name": "Python 3",
5+
"build": {
6+
// Sets the run context to one level up instead of the .devcontainer folder.
7+
"args": { "VARIANT": "3.8" },
8+
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
9+
"dockerfile": "Dockerfile"
10+
},
11+
12+
"postCreateCommand": "bash .devcontainer/postCreate.sh"
13+
}

.devcontainer/postCreate.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
echo "Post Create Starting"
2+
3+
nox -s unit-3.8

.devcontainer/requirements.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nox>=2022.11.21

.devcontainer/requirements.txt

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#
2+
# This file is autogenerated by pip-compile with Python 3.9
3+
# by the following command:
4+
#
5+
# pip-compile --generate-hashes requirements.in
6+
#
7+
argcomplete==3.1.1 \
8+
--hash=sha256:35fa893a88deea85ea7b20d241100e64516d6af6d7b0ae2bed1d263d26f70948 \
9+
--hash=sha256:6c4c563f14f01440aaffa3eae13441c5db2357b5eec639abe7c0b15334627dff
10+
# via nox
11+
colorlog==6.7.0 \
12+
--hash=sha256:0d33ca236784a1ba3ff9c532d4964126d8a2c44f1f0cb1d2b0728196f512f662 \
13+
--hash=sha256:bd94bd21c1e13fac7bd3153f4bc3a7dc0eb0974b8bc2fdf1a989e474f6e582e5
14+
# via nox
15+
distlib==0.3.7 \
16+
--hash=sha256:2e24928bc811348f0feb63014e97aaae3037f2cf48712d51ae61df7fd6075057 \
17+
--hash=sha256:9dafe54b34a028eafd95039d5e5d4851a13734540f1331060d31c9916e7147a8
18+
# via virtualenv
19+
filelock==3.12.2 \
20+
--hash=sha256:002740518d8aa59a26b0c76e10fb8c6e15eae825d34b6fdf670333fd7b938d81 \
21+
--hash=sha256:cbb791cdea2a72f23da6ac5b5269ab0a0d161e9ef0100e653b69049a7706d1ec
22+
# via virtualenv
23+
nox==2023.4.22 \
24+
--hash=sha256:0b1adc619c58ab4fa57d6ab2e7823fe47a32e70202f287d78474adcc7bda1891 \
25+
--hash=sha256:46c0560b0dc609d7d967dc99e22cb463d3c4caf54a5fda735d6c11b5177e3a9f
26+
# via -r requirements.in
27+
packaging==23.1 \
28+
--hash=sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61 \
29+
--hash=sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f
30+
# via nox
31+
platformdirs==3.9.1 \
32+
--hash=sha256:1b42b450ad933e981d56e59f1b97495428c9bd60698baab9f3eb3d00d5822421 \
33+
--hash=sha256:ad8291ae0ae5072f66c16945166cb11c63394c7a3ad1b1bc9828ca3162da8c2f
34+
# via virtualenv
35+
virtualenv==20.24.1 \
36+
--hash=sha256:01aacf8decd346cf9a865ae85c0cdc7f64c8caa07ff0d8b1dfc1733d10677442 \
37+
--hash=sha256:2ef6a237c31629da6442b0bcaa3999748108c7166318d1f55cc9f8d7294e97bd
38+
# via nox

0 commit comments

Comments
 (0)