Subject: Docker test cleanup Origin: upstream, commit 0.4.27-8-g3794a39 Author: Adam Hupp Date: Mon Oct 24 08:20:54 2022 -0700 --- a/test/docker/alpine +++ b/test/docker/alpine @@ -3,5 +3,3 @@ WORKDIR /python-magic COPY . . RUN python3 -m pip install tox -CMD python3 -m tox - --- 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 --- 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 --- 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 - --- a/test/docker/centos8 +++ b/test/docker/centos8 @@ -4,8 +4,7 @@ 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 - --- 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 + --- 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 --- a/test/run_all_docker_test.sh +++ b/test/run_all_docker_test.sh @@ -6,8 +6,8 @@ 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