Permalink
Please
sign in to comment.
@@ -0,0 +1,12 @@ | ||
export PS1='\w$ ' | ||
|
||
alias ls='ls --color=auto' | ||
|
||
aws_config () { | ||
export AWS_DEFAULT_OUTPUT=json | ||
export AWS_PROFILE=$1 | ||
export AWS_DEFAULT_PROFILE=$1 | ||
export AWS_REGION=$2 | ||
export AWS_DEFAULT_REGION=$2 | ||
} | ||
|
@@ -0,0 +1 @@ | ||
FROM icdotdev:_devcontainer |
@@ -0,0 +1,2 @@ | ||
base: | ||
docker build -t icdotdev:_devcontainer -f _Dockerfile . |
@@ -0,0 +1,243 @@ | ||
FROM buildpack-deps:buster | ||
|
||
# ---------------------------------------------------------------------- | ||
# hhttps://github.com/docker-library/python/blob/0b1fb9529c79ea85b8c80ff3dd85a32a935b0346/3.8/buster/slim/Dockerfile | ||
# ---------------------------------------------------------------------- | ||
|
||
# ensure local python is preferred over distribution python | ||
ENV PATH /usr/local/bin:$PATH | ||
|
||
# http://bugs.python.org/issue19846 | ||
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. | ||
ENV LANG C.UTF-8 | ||
|
||
# runtime dependencies | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
ca-certificates \ | ||
netbase \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 | ||
ENV PYTHON_VERSION 3.8.0 | ||
|
||
RUN set -ex \ | ||
\ | ||
&& savedAptMark="$(apt-mark showmanual)" \ | ||
&& apt-get update && apt-get install -y --no-install-recommends \ | ||
dpkg-dev \ | ||
gcc \ | ||
libbz2-dev \ | ||
libc6-dev \ | ||
libexpat1-dev \ | ||
libffi-dev \ | ||
libgdbm-dev \ | ||
liblzma-dev \ | ||
libncursesw5-dev \ | ||
libreadline-dev \ | ||
libsqlite3-dev \ | ||
libssl-dev \ | ||
make \ | ||
tk-dev \ | ||
uuid-dev \ | ||
wget \ | ||
xz-utils \ | ||
zlib1g-dev \ | ||
# as of Stretch, "gpg" is no longer included by default | ||
$(command -v gpg > /dev/null || echo 'gnupg dirmngr') \ | ||
\ | ||
&& wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ | ||
&& wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ | ||
&& export GNUPGHOME="$(mktemp -d)" \ | ||
&& gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ | ||
&& gpg --batch --verify python.tar.xz.asc python.tar.xz \ | ||
&& { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ | ||
&& rm -rf "$GNUPGHOME" python.tar.xz.asc \ | ||
&& mkdir -p /usr/src/python \ | ||
&& tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \ | ||
&& rm python.tar.xz \ | ||
\ | ||
&& cd /usr/src/python \ | ||
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ | ||
&& ./configure \ | ||
--build="$gnuArch" \ | ||
--enable-loadable-sqlite-extensions \ | ||
--enable-optimizations \ | ||
--enable-shared \ | ||
--with-system-expat \ | ||
--with-system-ffi \ | ||
--without-ensurepip \ | ||
&& make -j "$(nproc)" \ | ||
&& make install \ | ||
&& ldconfig \ | ||
\ | ||
&& apt-mark auto '.*' > /dev/null \ | ||
&& apt-mark manual $savedAptMark \ | ||
&& find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ | ||
| awk '/=>/ { print $(NF-1) }' \ | ||
| sort -u \ | ||
| xargs -r dpkg-query --search \ | ||
| cut -d: -f1 \ | ||
| sort -u \ | ||
| xargs -r apt-mark manual \ | ||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
\ | ||
&& find /usr/local -depth \ | ||
\( \ | ||
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ | ||
-o \ | ||
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ | ||
\) -exec rm -rf '{}' + \ | ||
&& rm -rf /usr/src/python \ | ||
\ | ||
&& python3 --version | ||
|
||
# make some useful symlinks that are expected to exist | ||
RUN cd /usr/local/bin \ | ||
&& ln -s idle3 idle \ | ||
&& ln -s pydoc3 pydoc \ | ||
&& ln -s python3 python \ | ||
&& ln -s python3-config python-config | ||
|
||
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'" | ||
ENV PYTHON_PIP_VERSION 19.3.1 | ||
# https://github.com/pypa/get-pip | ||
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/ffe826207a010164265d9cc807978e3604d18ca0/get-pip.py | ||
ENV PYTHON_GET_PIP_SHA256 b86f36cc4345ae87bfd4f10ef6b2dbfa7a872fbff70608a1e43944d283fd0eee | ||
|
||
RUN set -ex; \ | ||
\ | ||
savedAptMark="$(apt-mark showmanual)"; \ | ||
apt-get update; \ | ||
apt-get install -y --no-install-recommends wget; \ | ||
\ | ||
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ | ||
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \ | ||
\ | ||
apt-mark auto '.*' > /dev/null; \ | ||
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \ | ||
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ | ||
rm -rf /var/lib/apt/lists/*; \ | ||
\ | ||
python get-pip.py \ | ||
--disable-pip-version-check \ | ||
--no-cache-dir \ | ||
"pip==$PYTHON_PIP_VERSION" \ | ||
; \ | ||
pip --version; \ | ||
\ | ||
find /usr/local -depth \ | ||
\( \ | ||
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ | ||
-o \ | ||
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ | ||
\) -exec rm -rf '{}' +; \ | ||
rm -f get-pip.py | ||
|
||
# ---------------------------------------------------------------------- | ||
# https://github.com/nodejs/docker-node/blob/caad438f17000bdfe543a4466390a6e79d1dee93/13/buster-slim/Dockerfile | ||
# ---------------------------------------------------------------------- | ||
|
||
ENV NODE_VERSION 13.2.0 | ||
|
||
RUN buildDeps='xz-utils' \ | ||
&& ARCH= && dpkgArch="$(dpkg --print-architecture)" \ | ||
&& case "${dpkgArch##*-}" in \ | ||
amd64) ARCH='x64';; \ | ||
ppc64el) ARCH='ppc64le';; \ | ||
s390x) ARCH='s390x';; \ | ||
arm64) ARCH='arm64';; \ | ||
armhf) ARCH='armv7l';; \ | ||
i386) ARCH='x86';; \ | ||
*) echo "unsupported architecture"; exit 1 ;; \ | ||
esac \ | ||
&& set -ex \ | ||
&& apt-get update && apt-get install -y ca-certificates curl wget gnupg dirmngr $buildDeps --no-install-recommends \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& for key in \ | ||
94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \ | ||
FD3A5288F042B6850C66B31F09FE44734EB7990E \ | ||
71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \ | ||
DD8F2338BAE7501E3DD5AC78C273792F7D83545D \ | ||
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \ | ||
B9AE9905FFD7803F25714661B63B535A4C206CA9 \ | ||
77984A986EBC2AA786BC0F66B01FBB92821C587A \ | ||
8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \ | ||
4ED778F539E3634C779C87C6D7062848A1AB005C \ | ||
A48C2BEE680E841632CD4E44F07496B3EB3C1762 \ | ||
B9E2F5981AA6E0CD28160D9FF13993A75599653C \ | ||
; do \ | ||
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \ | ||
gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \ | ||
gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \ | ||
done \ | ||
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \ | ||
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \ | ||
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \ | ||
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \ | ||
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \ | ||
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \ | ||
&& apt-get purge -y --auto-remove $buildDeps \ | ||
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs | ||
|
||
ENV YARN_VERSION 1.19.1 | ||
|
||
RUN set -ex \ | ||
&& for key in \ | ||
6A010C5166006599AA17F08146C2130DFD2497F5 \ | ||
; do \ | ||
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \ | ||
gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \ | ||
gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \ | ||
done \ | ||
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \ | ||
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \ | ||
&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \ | ||
&& mkdir -p /opt \ | ||
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \ | ||
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \ | ||
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \ | ||
&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz | ||
|
||
# ---------------------------------------------------------------------- | ||
# Custom | ||
# ---------------------------------------------------------------------- | ||
|
||
RUN set -ex; \ | ||
\ | ||
apt update; \ | ||
apt install -y --no-install-recommends \ | ||
cloc \ | ||
curl \ | ||
direnv \ | ||
git \ | ||
groff \ | ||
jq \ | ||
less \ | ||
locales \ | ||
make \ | ||
silversearcher-ag \ | ||
tree \ | ||
unzip \ | ||
vim \ | ||
wget \ | ||
zip; \ | ||
\ | ||
yarn global add \ | ||
doctoc \ | ||
prettier; \ | ||
\ | ||
pip install \ | ||
awscli \ | ||
grip \ | ||
poetry==1.0.0b8; \ | ||
\ | ||
sed -i -e 's/# \(en_US\.UTF-8 .*\)/\1/' /etc/locale.gen; \ | ||
locale-gen en_US.UTF-8 | ||
|
||
ENV SHELL /bin/bash | ||
ENV LANG en_US.UTF-8 | ||
ENV LANGUAGE en_US:en | ||
ENV LC_ALL en_US.UTF-8 | ||
|
||
ADD .bashrc /root/ |
@@ -0,0 +1,19 @@ | ||
{ | ||
"appPort": [1664, 6419], | ||
"dockerFile": "Dockerfile", | ||
"extensions": [ | ||
"bungcip.better-toml", | ||
"editorconfig.editorconfig", | ||
"esbenp.prettier-vscode", | ||
"ms-python.python", | ||
"ryanluker.vscode-coverage-gutters", | ||
"visualstudioexptteam.vscodeintellicode" | ||
], | ||
"postCreateCommand": "poetry install", | ||
"runArgs": [ | ||
"-v", | ||
"${env:HOME}${env:USERPROFILE}/.aws:/root/.aws", | ||
"-v", | ||
"${env:HOME}${env:USERPROFILE}/.grip:/root/.grip" | ||
] | ||
} |
@@ -0,0 +1,18 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = false | ||
indent_size = 2 | ||
indent_style = space | ||
trim_trailing_whitespace = true | ||
|
||
[*.{md,rst}] | ||
trim_trailing_whitespace = false | ||
|
||
[*.{py,pyi}] | ||
indent_size = 4 | ||
|
||
[Makefile] | ||
indent_style = tab |
@@ -0,0 +1 @@ | ||
* -text |
@@ -0,0 +1,10 @@ | ||
.coverage | ||
.mypy_cache | ||
.pytest_cache | ||
.vscode/* | ||
!.vscode/settings.json | ||
*.egg-info | ||
__pycache__ | ||
cov.xml | ||
build | ||
dist |
@@ -0,0 +1,2 @@ | ||
.mypy_cache | ||
specs*/**/data |
@@ -0,0 +1,3 @@ | ||
{ | ||
"endOfLine": "lf" | ||
} |
@@ -0,0 +1,53 @@ | ||
{ | ||
// | ||
// Editor | ||
// | ||
"editor.codeActionsOnSave": { | ||
"source.organizeImports": true | ||
}, | ||
"editor.formatOnSave": true, | ||
"editor.renderWhitespace": "all", | ||
"editor.rulers": [72], | ||
"files.exclude": { | ||
".coverage": true, | ||
".git": true, | ||
".devcontainer": true, | ||
".editorconfig": true, | ||
".gitattributes": true, | ||
".gitignore": true, | ||
".mypy_cache": true, | ||
".prettier*": true, | ||
".pytest_cache": true, | ||
".vscode": true, | ||
"**/__pycache__": true, | ||
"**/*.egg-info": true, | ||
"cov.xml": true, | ||
// "build": true, | ||
"dist": true, | ||
"poetry.*": true | ||
}, | ||
"search.followSymlinks": true, | ||
// | ||
// Extensions | ||
// | ||
"python.analysis.disabled": [ | ||
"inherit-non-class", | ||
"typing-generic-arguments", | ||
"undefined-variable" | ||
], | ||
"python.jediEnabled": false, | ||
"python.formatting.provider": "black", | ||
"editor.formatOnSaveTimeout": 3000, | ||
"python.linting.enabled": true, | ||
"python.linting.mypyEnabled": true, | ||
"python.linting.pylintEnabled": false, | ||
"[javascript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[json]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[jsonc]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
} | ||
} |

Oops, something went wrong.
0 comments on commit
33401d7