summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Hupp <adam@hupp.org>2022-10-24 08:20:54 -0700
committerAdam Hupp <adam@hupp.org>2023-01-10 15:04:14 -0800
commit3794a39a9dff31a12dc2e6140b736be431c17750 (patch)
tree449e0012e91f01417eac842fcfeda0d9f22ce7af
parent05fde96b7c7feac611c1f2e7eb6bcf4b9ff933b9 (diff)
downloadpython-magic-3794a39a9dff31a12dc2e6140b736be431c17750.tar.gz
docker test cleanup
-rwxr-xr-xtest/docker/alpine2
-rwxr-xr-xtest/docker/archlinux7
-rwxr-xr-xtest/docker/bionic7
-rw-r--r--test/docker/centos75
-rw-r--r--test/docker/centos83
-rwxr-xr-xtest/docker/focal7
-rwxr-xr-xtest/docker/xenial7
-rwxr-xr-xtest/run_all_docker_test.sh4
8 files changed, 19 insertions, 23 deletions
diff --git a/test/docker/alpine b/test/docker/alpine
index c36b720..60b0698 100755
--- a/test/docker/alpine
+++ b/test/docker/alpine
@@ -3,5 +3,3 @@ RUN apk add python3 python2 libmagic
WORKDIR /python-magic
COPY . .
RUN python3 -m pip install tox
-CMD python3 -m tox
-
diff --git a/test/docker/archlinux b/test/docker/archlinux
index fc96c44..6592ffc 100755
--- a/test/docker/archlinux
+++ b/test/docker/archlinux
@@ -1,5 +1,6 @@
FROM archlinux:latest
RUN yes | pacman -Syyu --overwrite '*'
-RUN yes | pacman -S python python2 file which
-COPY . /python-magic
-CMD cd /python-magic/test && python3 ./run.py
+RUN yes | pacman -S python python-pip file which
+WORKDIR /python-magic
+COPY . .
+RUN python3 -m pip install tox
diff --git a/test/docker/bionic b/test/docker/bionic
index 2fe482c..a37b253 100755
--- a/test/docker/bionic
+++ b/test/docker/bionic
@@ -1,9 +1,8 @@
FROM ubuntu:bionic
-WORKDIR /python-magic
-COPY . .
RUN apt-get update
RUN apt-get -y install python python3 locales python3-pip libmagic1
RUN locale-gen en_US.UTF-8
-RUN python3 -m pip install tox
-CMD python3 -m tox
+WORKDIR /python-magic
+COPY . .
+RUN python3 -m pip install tox
diff --git a/test/docker/centos7 b/test/docker/centos7
index 10f170a..9caa989 100644
--- a/test/docker/centos7
+++ b/test/docker/centos7
@@ -1,9 +1,8 @@
FROM centos:7
RUN yum -y update
RUN yum -y install file-devel python3 python2 which
+ENV SKIP_FROM_DESCRIPTOR=1
+
WORKDIR /python-magic
COPY . .
RUN python3 -m pip install tox
-ENV SKIP_FROM_DESCRIPTOR=1
-CMD python3 -m tox
-
diff --git a/test/docker/centos8 b/test/docker/centos8
index 3b3da0a..7f2dbd0 100644
--- a/test/docker/centos8
+++ b/test/docker/centos8
@@ -4,8 +4,7 @@ RUN yum -y install file-libs python3 python2 which glibc-locale-source
RUN yum reinstall glibc-common -y && \
localedef -i en_US -f UTF-8 en_US.UTF-8 && \
echo "LANG=en_US.UTF-8" > /etc/locale.conf
+
WORKDIR /python-magic
COPY . .
RUN python3 -m pip install tox
-CMD python3 -m tox
-
diff --git a/test/docker/focal b/test/docker/focal
index b35040b..f24d231 100755
--- a/test/docker/focal
+++ b/test/docker/focal
@@ -1,9 +1,10 @@
FROM ubuntu:focal
-WORKDIR /python-magic
-COPY . .
RUN apt-get update
RUN apt-get -y install python python3 locales python3-pip libmagic1
RUN locale-gen en_US.UTF-8
+
+WORKDIR /python-magic
+COPY . .
RUN python3 -m pip install tox
-CMD python3 -m tox
+
diff --git a/test/docker/xenial b/test/docker/xenial
index e3c0433..fe7829b 100755
--- a/test/docker/xenial
+++ b/test/docker/xenial
@@ -1,9 +1,8 @@
FROM ubuntu:xenial
-WORKDIR /python-magic
-COPY . .
RUN apt-get update
RUN apt-get -y install python python3 locales python3-pip libmagic1
RUN locale-gen en_US.UTF-8
-RUN python3 -m pip install tox
-CMD python3 -m tox
+WORKDIR /python-magic
+COPY . .
+RUN python3 -m pip install tox
diff --git a/test/run_all_docker_test.sh b/test/run_all_docker_test.sh
index 68a2808..dce930b 100755
--- a/test/run_all_docker_test.sh
+++ b/test/run_all_docker_test.sh
@@ -6,8 +6,8 @@ set -x
ROOT=$(dirname $0)/..
cd $ROOT
-for f in test/docker/*; do
+for f in test/docker/*; do
H=$(docker build -q -f ${f} .)
- docker run --rm $H
+ docker run --rm $H python3 -m tox
done