ci/cd - fix linux package generation (again)

This commit is contained in:
bunkerity 2023-03-03 15:30:25 +01:00
parent 9250faa524
commit 8bf211bc53
10 changed files with 24 additions and 137 deletions

View File

@ -154,7 +154,7 @@ jobs:
secrets:
CICD_SECRETS: ${{ secrets.CICD_SECRETS }}
create-infra-linux:
needs: [code-security, build-bw, build-scheduler, build-autoconf]
needs: [code-security, build-ubuntu, build-debian, build-centos, build-fedora, build-rhel]
uses: ./.github/workflows/staging-create-infra.yml
with:
TYPE: k8s

View File

@ -1,21 +0,0 @@
FROM quay.io/centos/centos:stream8
ENV container=docker
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
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/*;
RUN dnf -y install sudo
RUN echo -e "[nginx-stable]\nname=nginx stable repo\nbaseurl=http://nginx.org/packages/centos/\$releasever/\$basearch/\ngpgcheck=1\nenabled=1\ngpgkey=https://nginx.org/keys/nginx_signing.key\nmodule_hotfixes=true" > /etc/yum.repos.d/nginx.repo
RUN sudo dnf install nginx-1.20.2 -y && sudo dnf install epel-release -y
VOLUME [/sys/fs/cgroup]
CMD ["/usr/sbin/init"]

View File

@ -1,38 +0,0 @@
FROM debian:bullseye
ENV container docker
ENV LC_ALL C
ENV DEBIAN_FRONTEND noninteractive
ENV NGINX_VERSION 1.20.2
RUN apt-get update \
&& apt-get install -y systemd systemd-sysv \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN cd /lib/systemd/system/sysinit.target.wants/ \
&& rm $(ls | grep -v systemd-tmpfiles-setup)
RUN rm -f /lib/systemd/system/multi-user.target.wants/* \
/etc/systemd/system/*.wants/* \
/lib/systemd/system/local-fs.target.wants/* \
/lib/systemd/system/sockets.target.wants/*udev* \
/lib/systemd/system/sockets.target.wants/*initctl* \
/lib/systemd/system/basic.target.wants/* \
/lib/systemd/system/anaconda.target.wants/* \
/lib/systemd/system/plymouth* \
/lib/systemd/system/systemd-update-utmp*
RUN apt update && \
apt-get install php-fpm curl gnupg2 ca-certificates python3-pip -y && \
echo "deb https://nginx.org/packages/debian/ bullseye nginx" > /etc/apt/sources.list.d/nginx.list && \
echo "deb-src https://nginx.org/packages/debian/ bullseye nginx" >> /etc/apt/sources.list.d/nginx.list && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ABF5BD827BD9BF62 && \
apt-get update && \
apt-get install -y --no-install-recommends nginx=${NGINX_VERSION}-1~bullseye
COPY ./packages/debian/*.deb /opt
VOLUME ["/sys/fs/cgroup"]
CMD ["/lib/systemd/systemd"]

View File

@ -1,33 +0,0 @@
FROM fedora:36
ENV container docker
RUN dnf -y update \
&& dnf -y install systemd \
&& dnf clean all
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/* \
/etc/systemd/system/*.wants/* \
/lib/systemd/system/local-fs.target.wants/* \
/lib/systemd/system/sockets.target.wants/*udev* \
/lib/systemd/system/sockets.target.wants/*initctl* \
/lib/systemd/system/basic.target.wants/* \
/lib/systemd/system/anaconda.target.wants/*
# Nginx
RUN dnf update -y && \
dnf install -y nginx-1.20.2
RUN curl -s https://packagecloud.io/install/repositories/bunkerity/bunkerweb/script.rpm.sh \
| sed 's/yum install -y pygpgme --disablerepo='\''bunkerity_bunkerweb'\''/yum install -y python-gnupg/g' \
| sed 's/pypgpme_check=`rpm -qa | grep -qw pygpgme`/python-gnupg_check=`rpm -qa | grep -qw python-gnupg`/g' \
| sudo bash && \
sudo dnf makecache && \
sudo dnf install -y bunkerweb-1.4.5
VOLUME ["/sys/fs/cgroup"]
CMD ["/usr/sbin/init"]

View File

@ -1,38 +0,0 @@
FROM ubuntu:22.04
ENV container docker
ENV LC_ALL C
ENV DEBIAN_FRONTEND noninteractive
ENV NGINX_VERSION 1.20.2
RUN apt-get update \
&& apt-get install -y systemd systemd-sysv \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN cd /lib/systemd/system/sysinit.target.wants/ \
&& rm $(ls | grep -v systemd-tmpfiles-setup)
RUN rm -f /lib/systemd/system/multi-user.target.wants/* \
/etc/systemd/system/*.wants/* \
/lib/systemd/system/local-fs.target.wants/* \
/lib/systemd/system/sockets.target.wants/*udev* \
/lib/systemd/system/sockets.target.wants/*initctl* \
/lib/systemd/system/basic.target.wants/* \
/lib/systemd/system/anaconda.target.wants/* \
/lib/systemd/system/plymouth* \
/lib/systemd/system/systemd-update-utmp*
RUN apt update && \
apt-get install php-fpm curl gnupg2 ca-certificates lsb-release ubuntu-keyring software-properties-common python3-pip -y && \
echo "deb https://nginx.org/packages/ubuntu/ jammy nginx" > /etc/apt/sources.list.d/nginx.list && \
echo "deb-src https://nginx.org/packages/ubuntu/ jammy nginx" >> /etc/apt/sources.list.d/nginx.list && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ABF5BD827BD9BF62 && \
apt-get update && \
apt-get install -y --no-install-recommends nginx=${NGINX_VERSION}-1~jammy
COPY ./packages/ubuntu/*.deb /opt
VOLUME ["/sys/fs/cgroup"]
CMD ["/lib/systemd/systemd"]

View File

@ -13,10 +13,10 @@ 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/*;
COPY linux/nginx.repo /etc/yum.repos.d/nginx.repo
COPY src/linux/nginx.repo /etc/yum.repos.d/nginx.repo
RUN dnf install php-fpm curl yum-utils epel-release -y && \
dnf install nginx-1.20.2 -y
dnf install nginx-1.22.1 -y
COPY ./package-centos/*.rpm /opt

View File

@ -3,7 +3,7 @@ FROM debian:bullseye
ENV container docker
ENV LC_ALL C
ENV DEBIAN_FRONTEND noninteractive
ENV NGINX_VERSION 1.20.2
ENV NGINX_VERSION 1.22.1
RUN apt-get update \
&& apt-get install -y systemd systemd-sysv \

View File

@ -1,4 +1,4 @@
FROM fedora:36
FROM fedora:37
ENV container docker
@ -20,7 +20,7 @@ RUN rm -f /lib/systemd/system/multi-user.target.wants/* \
# Nginx
RUN dnf update -y && \
dnf install -y php-fpm curl gnupg2 ca-certificates redhat-lsb-core python3-pip which && \
dnf install nginx-1.20.2 -y
dnf install nginx-1.22.1 -y
COPY ./package-fedora/*.rpm /opt

View File

@ -0,0 +1,17 @@
FROM redhat/ubi8-init:8.7
# Copy centos repo
COPY src/linux/centos.repo /etc/yum.repos.d/centos.repo
# Copy RPM-GPG-KEY-CentOS-Official
COPY src/linux/RPM-GPG-KEY-centosofficial /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
# Import RPM-GPG-KEY-CentOS-Official
RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
COPY src/linux/nginx.repo /etc/yum.repos.d/nginx.repo
RUN dnf install php-fpm curl yum-utils epel-release -y && \
dnf install nginx-1.22.1 -y
COPY ./package-rhel/*.rpm /opt

View File

@ -3,7 +3,7 @@ FROM ubuntu:22.04
ENV container docker
ENV LC_ALL C
ENV DEBIAN_FRONTEND noninteractive
ENV NGINX_VERSION 1.20.2
ENV NGINX_VERSION 1.22.1
RUN apt-get update \
&& apt-get install -y systemd systemd-sysv \