- update docker images to use git.unkin.net - update path to save rpms to git.unkin.net
56 lines
1.6 KiB
Docker
56 lines
1.6 KiB
Docker
# Start with the AlmaLinux 8.10 base image
|
|
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
|
|
|
# Create output directory for RPMs
|
|
RUN mkdir -p /app/dist
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
ARG PACKAGE_RELEASE
|
|
ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
|
|
ARG PACKAGE_VERSION
|
|
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
|
|
|
|
COPY scripts /app/scripts
|
|
COPY resources /app/resources
|
|
|
|
# Download the required files
|
|
RUN dnf install -y \
|
|
unzip \
|
|
libtool \
|
|
autoconf \
|
|
automake \
|
|
gcc \
|
|
make \
|
|
git \
|
|
go \
|
|
cowsql-devel \
|
|
libacl-devel \
|
|
libcap-devel \
|
|
libseccomp-devel \
|
|
libuv-devel \
|
|
raft-devel \
|
|
libudev-devel \
|
|
lxc-devel \
|
|
libsqlite3x-devel \
|
|
sqlite-devel \
|
|
systemd-rpm-macros \
|
|
bash-completion \
|
|
gettext \
|
|
help2man \
|
|
wget && \
|
|
wget -O /app/incus.tar.gz https://github.com/lxc/incus/archive/refs/tags/v${PACKAGE_VERSION}.tar.gz && tar -C /app -xf incus.tar.gz && \
|
|
wget https://go.dev/dl/go1.24.1.linux-amd64.tar.gz && rm -rf /usr/local/go && tar -C /usr/local -xzf go1.24.1.linux-amd64.tar.gz && \
|
|
export PATH=/usr/local/go/bin:$PATH && \
|
|
pushd /app/incus-${PACKAGE_VERSION} && \
|
|
make deps && \
|
|
export CGO_CFLAGS="-I/root/go/deps/raft/include/ -I/root/go/deps/cowsql/include/" && \
|
|
export CGO_LDFLAGS="-L/root/go/deps/raft/.libs -L/root/go/deps/cowsql/.libs/" && \
|
|
export LD_LIBRARY_PATH="/root/go/deps/raft/.libs/:/root/go/deps/cowsql/.libs/" && \
|
|
export CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)" && \
|
|
make build
|
|
|
|
# Default command to build RPMs
|
|
CMD /app/scripts/build-packages.sh
|