Skip to content

Commit 0751e4a

Browse files
authored
Remove some workarounds (#507)
1 parent cc110e7 commit 0751e4a

File tree

3 files changed

+13
-22
lines changed

3 files changed

+13
-22
lines changed

molecule/default/Dockerfile.j2

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@ ENV {{ var }} {{ value }}
1414
{% endfor %}
1515
{% endif %}
1616

17-
RUN if [ $(command -v apt-get) ] && [ $(command -v systemctl) ] && [ ! -f /sbin/init ]; then export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y python3 sudo bash ca-certificates iproute2 python3-apt python3-psutil aptitude systemd-sysv && apt-get clean && rm -rf /var/lib/apt/lists/*; \
18-
elif [ $(command -v apt-get) ]; then export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y python3 sudo bash ca-certificates iproute2 python3-apt python3-psutil aptitude && apt-get clean && rm -rf /var/lib/apt/lists/*; \
19-
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python3-devel /usr/bin/dnf-3 python3-psutil sudo bash iproute && dnf clean all; \
20-
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y /usr/bin/python /usr/bin/python2-config sudo yum-plugin-ovl python-psutil bash iproute && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
21-
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python3 python3-psutil sudo bash iproute2 && zypper clean -a; \
22-
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python3 sudo bash ca-certificates; \
23-
elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python3 sudo bash ca-certificates iproute2 && xbps-remove -O; fi
17+
RUN if [ $(command -v apt-get) ]; then export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y python3 sudo bash ca-certificates iproute2 python3-apt python3-psutil aptitude rsync && apt-get clean && rm -rf /var/lib/apt/lists/*; \
18+
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install /usr/bin/python3 /usr/bin/python3-config /usr/bin/dnf-3 sudo bash iproute python3-psutil rsync && dnf clean all; \
19+
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y /usr/bin/python /usr/bin/python2-config sudo yum-plugin-ovl bash iproute python-psutil rsync && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
20+
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python3 python3-psutil sudo bash iproute2 rsync && zypper clean -a; \
21+
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python3 sudo bash ca-certificates rsync; \
22+
elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python3 sudo bash ca-certificates iproute2 rsync && xbps-remove -O; fi

molecule/default/molecule.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,6 @@ platforms:
7979
- /sys/fs/cgroup:/sys/fs/cgroup:rw
8080
cgroupns_mode: host
8181
privileged: true
82-
- name: oraclelinux-8 # EOL 2029-07-01
83-
image: dokken/oraclelinux-8:latest
84-
override_command: false
85-
volumes:
86-
- ${MOLECULE_PROJECT_DIRECTORY}/target:/var/tmp/target
87-
- /sys/fs/cgroup:/sys/fs/cgroup:rw
88-
cgroupns_mode: host
89-
privileged: true
9082
- name: oraclelinux-9 # EOL 2032-06-30
9183
image: dokken/oraclelinux-9:latest
9284
override_command: false

molecule/servlet/Dockerfile.j2

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Molecule managed
22

3-
{% if item.registry is defined and '/' not in item.image %}
3+
{% if item.registry is defined %}
44
FROM {{ item.registry.url }}/{{ item.image }}
55
{% else %}
66
FROM {{ item.image }}
@@ -14,9 +14,9 @@ ENV {{ var }} {{ value }}
1414
{% endfor %}
1515
{% endif %}
1616

17-
RUN if [ $(command -v apt-get) ]; then export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y python3 sudo bash ca-certificates iproute2 python3-apt python3-psutil python3-lxml aptitude && apt-get clean && rm -rf /var/lib/apt/lists/*; \
18-
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install /usr/bin/python3 /usr/bin/python3-config /usr/bin/dnf-3 python3-psutil sudo bash iproute && dnf clean all; \
19-
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y /usr/bin/python3 /usr/bin/python3-config python3-pip gcc sudo yum-plugin-ovl bash iproute && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
20-
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python3 sudo bash iproute2 && zypper clean -a; \
21-
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python3 bash ca-certificates; \
22-
elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python3 sudo bash ca-certificates iproute2 && xbps-remove -O; fi
17+
RUN if [ $(command -v apt-get) ]; then export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y python3 sudo bash ca-certificates iproute2 python3-apt python3-lxml python3-psutil aptitude rsync && apt-get clean && rm -rf /var/lib/apt/lists/*; \
18+
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install /usr/bin/python3 /usr/bin/python3-config /usr/bin/dnf-3 sudo bash iproute python3-psutil rsync && dnf clean all; \
19+
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y /usr/bin/python /usr/bin/python2-config sudo yum-plugin-ovl bash iproute python-psutil rsync && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
20+
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python3 python3-psutil sudo bash iproute2 rsync && zypper clean -a; \
21+
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python3 sudo bash ca-certificates rsync; \
22+
elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python3 sudo bash ca-certificates iproute2 rsync && xbps-remove -O; fi

0 commit comments

Comments
 (0)