-
Notifications
You must be signed in to change notification settings - Fork 7
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
Showing
2 changed files
with
44 additions
and
43 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,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" ] |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
buster.dockerfile |