Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up package builders in light of switch to CMake. #231

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/data/matrices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ meta:
anchors:
pkg-builder-revs: &pkg-builder-revs
- v1
- v2
static:
image: static-builder
revisions:
Expand Down
78 changes: 78 additions & 0 deletions package-builders/Dockerfile.amazonlinux2.v2
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
FROM amazonlinux:2

LABEL org.opencontainers.image.authors="Netdatabot <[email protected]>"
LABEL org.opencontainers.image.source="https://github.com/netdata/helper-images"
LABEL org.opencontainers.image.title="Netdata Package Builder for Amazon Linux 2"
LABEL org.opencontainers.image.description="Package builder image for Netdata official RPM packages for Amazon Linux 2"
LABEL org.opencontainers.image.vendor="Netdata Inc."

ENV VERSION=$VERSION

RUN yum update -y && \
yum install -y bison \
bison-devel \
cmake \
cups-devel \
curl \
diffutils \
findutils \
flex \
flex-devel \
gcc \
gcc-c++ \
git-core \
golang \
libatomic \
libcurl-devel \
lm_sensors \
make \
ninja-build \
openssl-perl \
patch \
pkgconfig \
'pkgconfig(json-c)' \
'pkgconfig(libelf)' \
'pkgconfig(liblz4)' \
'pkgconfig(libmnl)' \
'pkgconfig(libmongoc-1.0)' \
'pkgconfig(libnetfilter_acct)' \
'pkgconfig(libsystemd)' \
'pkgconfig(libuv)' \
'pkgconfig(openssl)' \
'pkgconfig(snappy)' \
'pkgconfig(uuid)' \
'pkgconfig(yaml-0.1)' \
'pkgconfig(zlib)' \
procps \
protobuf-c-devel \
protobuf-compiler \
protobuf-devel \
rpm-build \
rpm-devel \
rpmdevtools \
wget && \
yum clean all && \
c_rehash && \
mkdir -p /root/rpmbuild/BUILD /root/rpmbuild/RPMS /root/rpmbuild/SOURCES /root/rpmbuild/SPECS /root/rpmbuild/SRPMS

# Fetch a newer version of CMake, because the system-provided one is _ancient_.
# The hash is hard-coded here to mitigate the risk of supply-chain attacks.
RUN curl --fail -sSL --connect-timeout 20 --retry 3 --output cmake-linux-$(uname -m).sh \

Check warning on line 60 in package-builders/Dockerfile.amazonlinux2.v2

View workflow job for this annotation

GitHub Actions / hadolint

[hadolint] reported by reviewdog 🐶 Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check Raw Output: message:"Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check" location:{path:"package-builders/Dockerfile.amazonlinux2.v2" range:{start:{line:60 column:1}}} severity:WARNING source:{name:"hadolint" url:"https://github.com/hadolint/hadolint"} code:{value:"DL4006" url:"https://github.com/hadolint/hadolint/wiki/DL4006"}

Check warning on line 60 in package-builders/Dockerfile.amazonlinux2.v2

View workflow job for this annotation

GitHub Actions / hadolint

[hadolint] reported by reviewdog 🐶 Quote this to prevent word splitting. Raw Output: message:"Quote this to prevent word splitting." location:{path:"package-builders/Dockerfile.amazonlinux2.v2" range:{start:{line:60 column:1}}} severity:WARNING source:{name:"hadolint" url:"https://github.com/hadolint/hadolint"} code:{value:"SC2046" url:"https://github.com/koalaman/shellcheck/wiki/SC2046"}
https://github.com/Kitware/CMake/releases/download/v3.27.6/cmake-3.27.6-linux-$(uname -m).sh && \
if [ "$(uname -m)" = "x86_64" ]; then \
echo '8c449dabb2b2563ec4e6d5e0fb0ae09e729680efab71527b59015131cea4a042 cmake-linux-x86_64.sh' | sha256sum -c - ; \
elif [ "$(uname -m)" = "aarch64" ]; then \
echo 'a83e01ed1cdf44c2e33e0726513b9a35a8c09e3b5a126fd720b3c8a9d5552368 cmake-linux-aarch64.sh' | sha256sum -c - ; \
else \
echo "ARCH NOT SUPPORTED BY CMAKE" ; \
exit 1 ; \
fi && \
chmod +x ./cmake-linux-$(uname -m).sh && \
mkdir -p /cmake && \
./cmake-linux-$(uname -m).sh --skip-license --prefix=/cmake

COPY package-builders/entrypoint.sh /entrypoint.sh
COPY package-builders/fedora-build.sh /build.sh

ENTRYPOINT ["/entrypoint.sh"]
CMD ["/build.sh"]
61 changes: 61 additions & 0 deletions package-builders/Dockerfile.amazonlinux2023.v2
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
FROM amazonlinux:2023

LABEL org.opencontainers.image.authors="Netdatabot <[email protected]>"
LABEL org.opencontainers.image.source="https://github.com/netdata/helper-images"
LABEL org.opencontainers.image.title="Netdata Package Builder for Amazon Linux 2023"
LABEL org.opencontainers.image.description="Package builder image for Netdata official RPM packages for Amazon Linux 2023"
LABEL org.opencontainers.image.vendor="Netdata Inc."

ENV VERSION=$VERSION

RUN dnf distro-sync -y --nodocs && \
dnf clean packages && \
dnf install -y --nodocs --allowerasing --setopt=install_weak_deps=False --setopt=diskspacecheck=False \
bison \
bison-devel \
cmake \
cups-devel \
curl \
diffutils \
findutils \
flex \
flex-devel \
gcc \
gcc-c++ \
git-core \
golang \
libatomic \
libcurl-devel \
lm_sensors \
make \
ninja-build \
openssl-perl \
patch \
pkgconfig \
'pkgconfig(json-c)' \
'pkgconfig(libelf)' \
'pkgconfig(libsystemd)' \
'pkgconfig(libuv)' \
'pkgconfig(liblz4)' \
'pkgconfig(openssl)' \
'pkgconfig(snappy)' \
'pkgconfig(uuid)' \
'pkgconfig(yaml-0.1)' \
'pkgconfig(zlib)' \
procps \
protobuf-c-devel \
protobuf-compiler \
protobuf-devel \
rpm-build \
rpm-devel \
rpmdevtools \
wget && \
rm -rf /var/cache/dnf && \
c_rehash && \
mkdir -p /root/rpmbuild/BUILD /root/rpmbuild/RPMS /root/rpmbuild/SOURCES /root/rpmbuild/SPECS /root/rpmbuild/SRPMS

COPY package-builders/entrypoint.sh /entrypoint.sh
COPY package-builders/fedora-build.sh /build.sh

ENTRYPOINT ["/entrypoint.sh"]
CMD ["/build.sh"]
66 changes: 66 additions & 0 deletions package-builders/Dockerfile.centos-stream8.v2
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
FROM quay.io/centos/centos:stream8

LABEL org.opencontainers.image.authors="Netdatabot <[email protected]>"
LABEL org.opencontainers.image.source="https://github.com/netdata/helper-images"
LABEL org.opencontainers.image.title="Netdata Package Builder for CentOS-Stream 8"
LABEL org.opencontainers.image.description="Package builder image for Netdata official RPM packages for CentOS-Stream 8"
LABEL org.opencontainers.image.vendor="Netdata Inc."

ENV VERSION=$VERSION

RUN dnf distro-sync -y --nodocs && \
dnf install -y --nodocs 'dnf-command(config-manager)' epel-release && \
dnf config-manager --set-enabled powertools && \
dnf clean packages && \
dnf install -y --nodocs --setopt=install_weak_deps=False --setopt=diskspacecheck=False \
bison \
cmake \
cups-devel \
curl \
diffutils \
findutils \
flex \
freeipmi-devel \
gcc \
gcc-c++ \
git \
golang \
libatomic \
libcurl-devel \
lm_sensors \
make \
ninja-build \
openssl-perl \
patch \
pkgconfig \
'pkgconfig(libmongoc-1.0)' \
'pkgconfig(json-c)' \
'pkgconfig(libelf)' \
'pkgconfig(libipmimonitoring)' \
'pkgconfig(libsystemd)' \
'pkgconfig(libuv)' \
'pkgconfig(liblz4)' \
'pkgconfig(openssl)' \
'pkgconfig(snappy)' \
'pkgconfig(uuid)' \
'pkgconfig(yaml-0.1)' \
'pkgconfig(zlib)' \
procps \
protobuf-c-devel \
protobuf-compiler \
protobuf-devel \
python3 \
python3-pyyaml \
rpm-build \
rpm-devel \
rpmdevtools \
wget && \
rm -rf /var/cache/dnf && \
c_rehash && \
mkdir -p /root/rpmbuild/BUILD /root/rpmbuild/RPMS /root/rpmbuild/SOURCES /root/rpmbuild/SPECS /root/rpmbuild/SRPMS

COPY package-builders/entrypoint.sh /entrypoint.sh
COPY package-builders/fedora-build.sh /build.sh

ENTRYPOINT ["/entrypoint.sh"]
CMD ["/build.sh"]
65 changes: 65 additions & 0 deletions package-builders/Dockerfile.centos-stream9.v2
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
FROM quay.io/centos/centos:stream9

LABEL org.opencontainers.image.authors="Netdatabot <[email protected]>"
LABEL org.opencontainers.image.source="https://github.com/netdata/helper-images"
LABEL org.opencontainers.image.title="Netdata Package Builder for CentOS-Stream 9"
LABEL org.opencontainers.image.description="Package builder image for Netdata official RPM packages for CentOS-Stream 9"
LABEL org.opencontainers.image.vendor="Netdata Inc."

ENV VERSION=$VERSION

RUN dnf distro-sync -y --nodocs && \
dnf install -y --nodocs 'dnf-command(config-manager)' epel-release && \
dnf config-manager --set-enabled crb && \
dnf clean packages && \
dnf install -y --allowerasing --nodocs --setopt=install_weak_deps=False --setopt=diskspacecheck=False \
bison \
cmake \
cups-devel \
curl \
diffutils \
findutils \
flex \
gcc \
gcc-c++ \
git \
golang \
libatomic \
libcurl-devel \
lm_sensors \
make \
ninja-build \
openssl-perl \
patch \
pkgconfig \
'pkgconfig(json-c)' \
'pkgconfig(libelf)' \
'pkgconfig(libipmimonitoring)' \
'pkgconfig(liblz4)' \
'pkgconfig(libmongoc-1.0)' \
'pkgconfig(libsystemd)' \
'pkgconfig(libuv)' \
'pkgconfig(openssl)' \
'pkgconfig(snappy)' \
'pkgconfig(uuid)' \
'pkgconfig(yaml-0.1)' \
'pkgconfig(zlib)' \
procps \
protobuf-c-devel \
protobuf-compiler \
protobuf-devel \
python3 \
python3-pyyaml \
rpm-build \
rpm-devel \
rpmdevtools \
wget && \
rm -rf /var/cache/dnf && \
c_rehash && \
mkdir -p /root/rpmbuild/BUILD /root/rpmbuild/RPMS /root/rpmbuild/SOURCES /root/rpmbuild/SPECS /root/rpmbuild/SRPMS

COPY package-builders/entrypoint.sh /entrypoint.sh
COPY package-builders/fedora-build.sh /build.sh

ENTRYPOINT ["/entrypoint.sh"]
CMD ["/build.sh"]
80 changes: 80 additions & 0 deletions package-builders/Dockerfile.centos7.v2
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
FROM centos:7

LABEL org.opencontainers.image.authors="Netdatabot <[email protected]>"
LABEL org.opencontainers.image.source="https://github.com/netdata/helper-images"
LABEL org.opencontainers.image.title="Netdata Package Builder for CentOS 7"
LABEL org.opencontainers.image.description="Package builder image for Netdata official RPM packages for CentOS 7"
LABEL org.opencontainers.image.vendor="Netdata Inc."

ENV VERSION=$VERSION

RUN yum install -y epel-release && \
yum update -y && \
yum install -y bison \
bison-devel \
cmake \
cups-devel \
curl \
diffutils \
findutils \
flex \
flex-devel \
gcc \
gcc-c++ \
git-core \
golang \
libatomic \
libcurl-devel \
lm_sensors \
make \
ninja-build \
openssl-perl \
patch \
pkgconfig \
'pkgconfig(json-c)' \
'pkgconfig(libelf)' \
'pkgconfig(libipmimonitoring)' \
'pkgconfig(liblz4)' \
'pkgconfig(libmnl)' \
'pkgconfig(libmongoc-1.0)' \
'pkgconfig(libnetfilter_acct)' \
'pkgconfig(libsystemd)' \
'pkgconfig(libuv)' \
'pkgconfig(openssl)' \
'pkgconfig(snappy)' \
'pkgconfig(uuid)' \
'pkgconfig(yaml-0.1)' \
'pkgconfig(zlib)' \
procps \
protobuf-c-devel \
protobuf-compiler \
protobuf-devel \
rpm-build \
rpm-devel \
rpmdevtools \
wget && \
yum clean all && \
c_rehash && \
mkdir -p /root/rpmbuild/BUILD /root/rpmbuild/RPMS /root/rpmbuild/SOURCES /root/rpmbuild/SPECS /root/rpmbuild/SRPMS

# Fetch a newer version of CMake, because the system-provided one is _ancient_.
# The hash is hard-coded here to mitigate the risk of supply-chain attacks.
RUN curl --fail -sSL --connect-timeout 20 --retry 3 --output cmake-linux-$(uname -m).sh \

Check warning on line 62 in package-builders/Dockerfile.centos7.v2

View workflow job for this annotation

GitHub Actions / hadolint

[hadolint] reported by reviewdog 🐶 Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check Raw Output: message:"Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check" location:{path:"package-builders/Dockerfile.centos7.v2" range:{start:{line:62 column:1}}} severity:WARNING source:{name:"hadolint" url:"https://github.com/hadolint/hadolint"} code:{value:"DL4006" url:"https://github.com/hadolint/hadolint/wiki/DL4006"}

Check warning on line 62 in package-builders/Dockerfile.centos7.v2

View workflow job for this annotation

GitHub Actions / hadolint

[hadolint] reported by reviewdog 🐶 Quote this to prevent word splitting. Raw Output: message:"Quote this to prevent word splitting." location:{path:"package-builders/Dockerfile.centos7.v2" range:{start:{line:62 column:1}}} severity:WARNING source:{name:"hadolint" url:"https://github.com/hadolint/hadolint"} code:{value:"SC2046" url:"https://github.com/koalaman/shellcheck/wiki/SC2046"}
https://github.com/Kitware/CMake/releases/download/v3.27.6/cmake-3.27.6-linux-$(uname -m).sh && \
if [ "$(uname -m)" = "x86_64" ]; then \
echo '8c449dabb2b2563ec4e6d5e0fb0ae09e729680efab71527b59015131cea4a042 cmake-linux-x86_64.sh' | sha256sum -c - ; \
elif [ "$(uname -m)" = "aarch64" ]; then \
echo 'a83e01ed1cdf44c2e33e0726513b9a35a8c09e3b5a126fd720b3c8a9d5552368 cmake-linux-aarch64.sh' | sha256sum -c - ; \
else \
echo "ARCH NOT SUPPORTED BY CMAKE" ; \
exit 1 ; \
fi && \
chmod +x ./cmake-linux-$(uname -m).sh && \
mkdir -p /cmake && \
./cmake-linux-$(uname -m).sh --skip-license --prefix=/cmake

COPY package-builders/entrypoint.sh /entrypoint.sh
COPY package-builders/fedora-build.sh /build.sh

ENTRYPOINT ["/entrypoint.sh"]
CMD ["/build.sh"]
Loading
Loading