Skip to content

Instantly share code, notes, and snippets.

@vad
Last active February 28, 2020 17:14
Show Gist options
  • Save vad/874bcd90092a98b21ae73a2982246b3c to your computer and use it in GitHub Desktop.
Save vad/874bcd90092a98b21ae73a2982246b3c to your computer and use it in GitHub Desktop.
FROM python:3.6-alpine
ARG JSONNET_VERSION=0.13.0
RUN addgroup -S app && adduser -S -G app app
ADD poetry.lock pyproject.toml /home/app/
# jsonnet executable is not required by python jsonnet, it's just for tests. It could also be moved to a different container
RUN apk -U add build-base libstdc++ bash findutils libffi-dev openssl-dev && \
wget -qO /tmp/jsonnet.zip https://github.com/google/jsonnet/archive/v${JSONNET_VERSION}.zip && \
unzip -qo -d /tmp/ /tmp/jsonnet.zip && \
cd /tmp/jsonnet-${JSONNET_VERSION} && \
make && \
cp jsonnet jsonnetfmt /usr/local/bin && \
cd && \
rm -rf /tmp/jsonnet* && \
pip install poetry==1.0.3 && \
poetry config virtualenvs.create false && \
cd /home/app/ && poetry install --no-ansi --no-interaction --no-dev && \
apk del build-base
COPY . /home/app/code
RUN chown -R app: /home/app/
WORKDIR /home/app/code
RUN poetry install --no-ansi --no-interaction --no-dev
USER app
[tool.poetry]
name = "meh"
version = "0.1.0"
description = "meeeh"
authors = ["..."]
[tool.poetry.dependencies]
python = "~3.6"
boto = "2.49.0"
requests = "2.11.1"
PrettyTable = "0.7.2"
arrow = ">=0.5<0.6"
pytz = "^2019.3"
gitpython = "3.1.0"
python-dateutil = "^2.8.1"
jsonnet = "0.13.0"
cachecontrol = {extras = ["filecache"], version = "^0.12.6"}
boto3 = "1.9.204"
[tool.poetry.dev-dependencies]
moto = "1.3.13"
isort = "4.3.4"
pre-commit = "^2.1.1"
flake8 = "3.7.8"
black = "19.3b0"
mypy = "0.740"
pytest = "5.2.1"
pytest-blockage = "0.2.2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment