|
| 1 | +# syntax=docker/dockerfile-upstream:1.5.0-rc2-labs |
| 2 | + |
| 3 | +# Copyright (c) 2025 Zededa, Inc. |
| 4 | +# SPDX-License-Identifier: Apache-2.0 |
| 5 | + |
| 6 | +# Yetus image with all dependencies needed for EVE project |
| 7 | + |
| 8 | +FROM ghcr.io/apache/yetus:0.15.1 as build |
| 9 | + |
| 10 | +ARG TARGETARCH |
| 11 | + |
| 12 | +ENV PKG_DEPS="alien autoconf automake build-essential debhelper dh-autoreconf dh-python dkms fakeroot gawk git libaio-dev libattr1-dev libblkid-dev libcurl4-openssl-dev libelf-dev libffi-dev libpam0g-dev libssl-dev libtirpc-dev libtool libudev-dev linux-headers-generic parallel po-debconf python3 python3-all-dev python3-cffi python3-dev python3-packaging python3-setuptools python3-sphinx uuid-dev zlib1g-dev" |
| 13 | + |
| 14 | +# should be aligned with kernel |
| 15 | +# * ZFS on Linux |
| 16 | +ENV ZFS_VERSION=2.3.3 |
| 17 | +ENV ZFS_COMMIT=zfs-${ZFS_VERSION} |
| 18 | +ENV ZFS_REPO=https://github.com/openzfs/zfs.git |
| 19 | + |
| 20 | +WORKDIR /tmp/zfs |
| 21 | +# hadolint ignore=DL3020 |
| 22 | +ADD ${ZFS_REPO}#${ZFS_COMMIT} /tmp/zfs |
| 23 | + |
| 24 | +# hadolint ignore=DL3008 |
| 25 | +RUN DEBIAN_FRONTEND=noninteractive apt-get update \ |
| 26 | + && apt-get install --no-install-recommends -y $PKG_DEPS \ |
| 27 | + && apt-get clean \ |
| 28 | + && rm -rf /var/lib/apt/lists/* |
| 29 | + |
| 30 | +RUN ./autogen.sh && \ |
| 31 | + ./configure \ |
| 32 | + --prefix=/usr \ |
| 33 | + --with-tirpc \ |
| 34 | + --sysconfdir=/etc \ |
| 35 | + --mandir=/usr/share/man \ |
| 36 | + --infodir=/usr/share/info \ |
| 37 | + --localstatedir=/var \ |
| 38 | + --with-config=user \ |
| 39 | + --with-udevdir=/lib/udev \ |
| 40 | + --disable-systemd \ |
| 41 | + --disable-static && \ |
| 42 | + ./scripts/make_gitrev.sh && \ |
| 43 | + make -j "$(getconf _NPROCESSORS_ONLN)" && \ |
| 44 | + make DESTDIR=/ install-strip |
| 45 | + |
| 46 | +# Use upstream golangci-lint instead of the one that comes with Yetus in |
| 47 | +# order to fix issues regarding patching code differences. |
| 48 | +ADD https://github.com/golangci/golangci-lint/releases/download/v2.6.2/golangci-lint-2.6.2-linux-${TARGETARCH}.deb /golangci-lint.deb |
| 49 | + |
| 50 | +RUN dpkg -i /golangci-lint.deb && \ |
| 51 | + rm /usr/local/bin/golangci-lint && \ |
| 52 | + ln -s /usr/bin/golangci-lint /usr/local/bin/golangci-lint && \ |
| 53 | + rm /golangci-lint.deb |
| 54 | + |
| 55 | +# Clean up |
| 56 | +RUN rm -r /tmp/zfs |
| 57 | + |
| 58 | +ENTRYPOINT ["/entrypoint.sh"] |
0 commit comments