Fixup Fedora Dockerfiles to work correctly

The test suite tests both Python 2 and Python 3, but the spec file
doesn't install both sets of dependencies, so we need to declare
the Python 2 dependencies to be installed in the Dockerfiles.

In addition, there's no reason to drag in yum-utils, since
"dnf builddep" exists and serves the same purpose.
This commit is contained in:
Neal Gompa 2017-04-01 15:04:11 -04:00
parent 18a21c6c5b
commit 0929d2d296
2 changed files with 31 additions and 25 deletions

View file

@ -1,25 +1,28 @@
FROM fedora:25 FROM fedora:25
MAINTAINER Steve Kuznetsov <skuznets@redhat.com> MAINTAINER Steve Kuznetsov <skuznets@redhat.com>
RUN dnf -y install \ # Manually install python2 deps since spec won't add them
yum-utils \ RUN dnf -y install \
git-annex \ 'dnf-command(builddep)' \
python2 \ git-annex \
python-devel \ python2-devel \
python-mock \ python-mock \
python-nose \ python-nose \
python-blessings \ python-blessings \
python-pep8 \ python-pep8 \
python3-mock \ python-setuptools \
python3-nose \ python-bugzilla \
python3-blessings \ python2-rpm \
python3-mock \
python3-nose \
python3-blessings \
python3-pep8 python3-pep8
RUN useradd sandbox RUN useradd sandbox
RUN git config --system user.email "sandbox@example.com" RUN git config --system user.email "sandbox@example.com"
RUN git config --system user.name "sandbox" RUN git config --system user.name "sandbox"
ADD tito.spec /tmp/tito.spec ADD tito.spec /tmp/tito.spec
RUN yum-builddep -y /tmp/tito.spec RUN dnf -y builddep /tmp/tito.spec
RUN dnf clean all RUN dnf clean all
USER sandbox USER sandbox

View file

@ -7,18 +7,21 @@ MAINTAINER Paul Morgan <jumanjiman@gmail.com>
# Run an update to work around https://bugzilla.redhat.com/show_bug.cgi?id=1409590 # Run an update to work around https://bugzilla.redhat.com/show_bug.cgi?id=1409590
# TODO: remove this once the Rawhide base image is updated # TODO: remove this once the Rawhide base image is updated
RUN dnf -y update RUN dnf -y update
# Install build dependencies. # Install build dependencies including python2 deps for testing.
RUN dnf -y install \ RUN dnf -y install \
'dnf-command(builddep)' \ 'dnf-command(builddep)' \
git-annex \ git-annex \
python-devel \ python2-devel \
python-mock \ python-mock \
python-nose \ python-nose \
python-blessings \ python-blessings \
python-pep8 \ python-pep8 \
python3-mock \ python-setuptools \
python3-nose \ python-bugzilla \
python3-blessings \ python2-rpm \
python3-mock \
python3-nose \
python3-blessings \
python3-pep8 python3-pep8
RUN useradd sandbox RUN useradd sandbox
@ -29,7 +32,7 @@ RUN git config --system user.name "sandbox"
# to work around https://github.com/dotcloud/docker/issues/1676 # to work around https://github.com/dotcloud/docker/issues/1676
ADD tito.spec /tmp/tito.spec ADD tito.spec /tmp/tito.spec
RUN dnf builddep -y /tmp/tito.spec RUN dnf -y builddep /tmp/tito.spec
RUN dnf clean all RUN dnf clean all
USER sandbox USER sandbox