Skip to content

Commit 3794a39

Browse files
committed
docker test cleanup
1 parent 05fde96 commit 3794a39

8 files changed

Lines changed: 19 additions & 23 deletions

File tree

test/docker/alpine

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,3 @@ RUN apk add python3 python2 libmagic
33
WORKDIR /python-magic
44
COPY . .
55
RUN python3 -m pip install tox
6-
CMD python3 -m tox
7-

test/docker/archlinux

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
FROM archlinux:latest
22
RUN yes | pacman -Syyu --overwrite '*'
3-
RUN yes | pacman -S python python2 file which
4-
COPY . /python-magic
5-
CMD cd /python-magic/test && python3 ./run.py
3+
RUN yes | pacman -S python python-pip file which
4+
WORKDIR /python-magic
5+
COPY . .
6+
RUN python3 -m pip install tox

test/docker/bionic

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
FROM ubuntu:bionic
2-
WORKDIR /python-magic
3-
COPY . .
42
RUN apt-get update
53
RUN apt-get -y install python python3 locales python3-pip libmagic1
64
RUN locale-gen en_US.UTF-8
7-
RUN python3 -m pip install tox
8-
CMD python3 -m tox
95

6+
WORKDIR /python-magic
7+
COPY . .
8+
RUN python3 -m pip install tox

test/docker/centos7

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
FROM centos:7
22
RUN yum -y update
33
RUN yum -y install file-devel python3 python2 which
4+
ENV SKIP_FROM_DESCRIPTOR=1
5+
46
WORKDIR /python-magic
57
COPY . .
68
RUN python3 -m pip install tox
7-
ENV SKIP_FROM_DESCRIPTOR=1
8-
CMD python3 -m tox
9-

test/docker/centos8

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ RUN yum -y install file-libs python3 python2 which glibc-locale-source
44
RUN yum reinstall glibc-common -y && \
55
localedef -i en_US -f UTF-8 en_US.UTF-8 && \
66
echo "LANG=en_US.UTF-8" > /etc/locale.conf
7+
78
WORKDIR /python-magic
89
COPY . .
910
RUN python3 -m pip install tox
10-
CMD python3 -m tox
11-

test/docker/focal

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
FROM ubuntu:focal
2-
WORKDIR /python-magic
3-
COPY . .
42
RUN apt-get update
53
RUN apt-get -y install python python3 locales python3-pip libmagic1
64
RUN locale-gen en_US.UTF-8
5+
6+
WORKDIR /python-magic
7+
COPY . .
78
RUN python3 -m pip install tox
8-
CMD python3 -m tox
9+
910

test/docker/xenial

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
FROM ubuntu:xenial
2-
WORKDIR /python-magic
3-
COPY . .
42
RUN apt-get update
53
RUN apt-get -y install python python3 locales python3-pip libmagic1
64
RUN locale-gen en_US.UTF-8
7-
RUN python3 -m pip install tox
8-
CMD python3 -m tox
95

6+
WORKDIR /python-magic
7+
COPY . .
8+
RUN python3 -m pip install tox

test/run_all_docker_test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ set -x
66
ROOT=$(dirname $0)/..
77
cd $ROOT
88

9-
for f in test/docker/*; do
9+
for f in test/docker/*; do
1010
H=$(docker build -q -f ${f} .)
11-
docker run --rm $H
11+
docker run --rm $H python3 -m tox
1212
done
1313

0 commit comments

Comments
 (0)