Skip to content

Commit

Permalink
Update dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
jlubken committed Jun 2, 2020
1 parent 5705ab1 commit 0b9ba0f
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 43 deletions.
43 changes: 43 additions & 0 deletions buster.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
ARG IFLAGS="--quiet --no-cache-dir --user"

FROM python:3.7.7-slim-buster as build
ARG IFLAGS
WORKDIR /root
ENV FREETDS /root/freetds.conf
ENV PATH /root/.local/bin:$PATH
ENV TINI_VERSION v0.16.1
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/bin/tini
COPY CHANGELOG.rst .
COPY README.rst .
COPY freetds.conf .
COPY setup.cfg .
COPY setup.py .
COPY pyproject.toml .
COPY .pre-commit-config.yaml .
COPY .pylintrc .
COPY .git ./.git
COPY src ./src
COPY test ./test
RUN \
chmod +x /usr/bin/tini && \
apt-get -qq update --fix-missing && \
apt-get -qq install -y --no-install-recommends git && \
pip install ${IFLAGS} "." && \
apt-get -qq clean && \
apt-get -qq autoremove -y --purge && \
rm -rf /var/lib/apt/lists/*

FROM build as lint
ARG IFLAGS
WORKDIR /root
ENV IMAGE dsdk.lint
RUN \
pip install ${IFLAGS} ".[all]"
ENTRYPOINT [ "/usr/bin/tini", "--" ]
CMD [ "pre-commit", "run", "--all-files" ]

FROM lint as test
WORKDIR /root
ENV IMAGE dsdk.test
ENTRYPOINT [ "/usr/bin/tini", "--" ]
CMD [ "python", "setup.py", "test" ]
43 changes: 0 additions & 43 deletions dockerfile

This file was deleted.

1 change: 1 addition & 0 deletions dockerfile

0 comments on commit 0b9ba0f

Please sign in to comment.