Skip to content

Commit 4e04b37

Browse files
committed
Add a docker file for testing
1 parent 6c5251c commit 4e04b37

File tree

3 files changed

+47
-0
lines changed

3 files changed

+47
-0
lines changed

.dockerignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.tox/
2+
.coverage_data/
3+
.python-version
4+
__pycache__/
5+
*.pyc
6+
build/
7+
dist/
8+
htmlcov/
9+
*.egg-info/
10+
*.egg

Dockerfile

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
FROM ubuntu:20.04
2+
LABEL authors="Sebastien Andrivet"
3+
4+
ARG DEBIAN_FRONTEND=noninteractive
5+
6+
RUN apt-get update && \
7+
apt install software-properties-common -y && \
8+
add-apt-repository ppa:deadsnakes/ppa && \
9+
apt-get update && \
10+
apt-get install -y --no-install-recommends git curl && \
11+
apt-get install -y --no-install-recommends \
12+
python2.7 \
13+
python3.4 \
14+
python3.5 \
15+
python3.6 python3.6-distutils \
16+
python3.7 python3.7-distutils \
17+
python3.8 python3.8-distutils \
18+
python3.9 \
19+
python3.10 \
20+
python3.11 \
21+
python3.12 \
22+
python3.13 && \
23+
apt-get clean && rm -rf /var/lib/apt/lists/*
24+
25+
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.12
26+
RUN pip3 install --upgrade pip setuptools wheel tox
27+
28+
RUN useradd --create-home user
29+
RUN mkdir /home/user/project && chown user:user /home/user/project
30+
31+
USER user
32+
WORKDIR /home/user/project
33+
COPY --chown=user . .
34+
35+
CMD ["tox"]

MANIFEST.in

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ graft tests
77
include .coveragerc
88
include .cookiecutterrc
99
include .editorconfig
10+
exclude Dockerfile
11+
exclude .dockerignore
1012

1113
include AUTHORS.rst
1214
include CHANGELOG.rst

0 commit comments

Comments
 (0)