Skip to content

Commit

Permalink
Clean Dockerfiles
Browse files Browse the repository at this point in the history
- start from almalinux:9 instead of centos9 (stream)
- avoid systemd
- don't use the garr mirror
- remove an unused docker-compose
  • Loading branch information
giacomini committed May 20, 2024
1 parent 86a4ede commit 660690a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 67 deletions.
43 changes: 0 additions & 43 deletions compose/docker-compose.test.yml

This file was deleted.

2 changes: 1 addition & 1 deletion docker/testsuite/Dockerfile.centos9
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/centos/centos:stream9
FROM almalinux:9

ARG USERNAME=test
ARG USER_UID=1000
Expand Down
18 changes: 1 addition & 17 deletions docker/voms/Dockerfile.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,9 @@ ENV VOMS_REPO_URL=https://italiangrid.github.io/voms-repo/repofiles/rhel/voms-${

COPY assets/scripts/*.sh /tmp/scripts/

RUN echo "include_only=.garr.it,.cern.ch" >> /etc/yum/pluginconf.d/fastestmirror.conf && \
yum -y install hostname which wget tar sudo file less epel-release ${UMD_RELEASE_PACKAGE_URL} yum-utils
RUN yum -y install hostname which wget tar sudo file less epel-release ${UMD_RELEASE_PACKAGE_URL} yum-utils
RUN yum-config-manager --add-repo ${VOMS_REPO_URL} && \
yum -y update && \
yum clean all && \
rm -rf /var/cache/yum && \
sh /tmp/scripts/provide-user.sh ${USERNAME} ${USER_UID} ${USER_GID}
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do \
[ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done);
RUN rm -f /lib/systemd/system/multi-user.target.wants/*; \
rm -f /etc/systemd/system/*.wants/*; \
rm -f /lib/systemd/system/local-fs.target.wants/*; \
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
rm -f /lib/systemd/system/basic.target.wants/*; \
rm -f /lib/systemd/system/anaconda.target.wants/*;

ENV container=docker

VOLUME [ "/sys/fs/cgroup" ]
CMD ["/usr/sbin/init"]

9 changes: 3 additions & 6 deletions docker/voms/Dockerfile.centos9
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/centos/centos:stream9
FROM almalinux:9

ARG USERNAME=test
ARG USER_UID=1000
Expand All @@ -11,13 +11,10 @@ ENV VOMS_REPO_URL=https://italiangrid.github.io/voms-repo/repofiles/rhel/voms-${

COPY assets/scripts/*.sh /tmp/scripts/

RUN echo "include_only=.garr.it,.cern.ch" >> /etc/yum/pluginconf.d/fastestmirror.conf && \
yum -y install hostname which wget tar sudo file less epel-release yum-utils util-linux-user
RUN yum -y install hostname which wget tar sudo file less epel-release yum-utils util-linux-user
RUN yum-config-manager --add-repo ${VOMS_REPO_URL} && \
yum -y update && \
yum clean all && \
rm -rf /var/cache/yum && \
sh /tmp/scripts/provide-user.sh ${USERNAME} ${USER_UID} ${USER_GID} && \
update-crypto-policies --set DEFAULT:SHA1

ENV container=docker
update-crypto-policies --set LEGACY

0 comments on commit 660690a

Please sign in to comment.