forked from rpm-software-management/ci-dnf-stack
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.ansible
56 lines (40 loc) · 1.21 KB
/
Dockerfile.ansible
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Build
# -----
# $ podman build -f Dockerfile.ansible -t ansible
#
# Run
# ---
# $ podman run -it --rm ansible ./ansible
# Build types
# -----------
# distro
# install distro packages
# copr
# install distro packages
# then upgrade to copr packages
# local
# install distro packages
# then upgrade to copr packages
# then install packages from local rpms/ folder
FROM fedora:31
ARG TYPE=local
# if not TYPE == copr nor local, disable nightly copr
RUN set -x && \
dnf -y install dnf-plugins-core; \
if [ "$TYPE" != "distro" ]; then \
dnf -y copr enable rpmsoftwaremanagement/dnf-nightly; \
fi
# upgrade all packages to the latest available versions
RUN set -x && \
dnf -y --refresh upgrade
RUN set -x && \
dnf -y install glibc-langpack-en python3-pip python3-jinja2 python3-pyyaml git findutils man-db which
# install local RPMs if available
COPY ./rpms/ /tmp/rpms/
RUN set -x && \
rm /tmp/rpms/*-{devel,debuginfo,debugsource}*.rpm; \
if [ -n "$(find /tmp/rpms/ -maxdepth 1 -name '*.rpm' -print -quit)" ]; then \
dnf -y install /tmp/rpms/*.rpm --disableplugin=local; \
fi
COPY ./integration/ /tmp/integration/
WORKDIR /tmp/integration