refactor: standardize Dockerfile and build script structure
Standardize all RPM packages to use a consistent build pattern: - Simple Dockerfiles that copy resources/ and call build.sh - Move all build logic to resources/build.sh scripts - Consolidate nfpm.yaml and scripts into resources/ directory - Update base image to almalinux9-rpmbuilder for consistency Changes: - Refactored 37 packages total (simple + complex) - HashiCorp tools: consul, vault, terraform, terragrunt, packer, nomad, nomad-autoscaler - Development tools: g10k, etcd, nfpm, ruff, uv, unrar, nzbget, boilerplate - VictoriaMetrics: vlutils, vmutils, victoria-logs - Network tools: cni-plugins, consul-cni, unkin-ca-certificates - Jellyfin suite: jellyfin-web, jellyfin-server, jellyfin-ffmpeg-bin - System packages: puppet-initial, incus This standardization improves maintainability and consistency across the entire RPM build system while preserving all existing functionality.
This commit is contained in:
@@ -11,13 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
|
||||
ARG PACKAGE_VERSION
|
||||
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
|
||||
|
||||
# Copy nfpm.yaml from the context into the container
|
||||
COPY nfpm.yaml /app/nfpm.yaml
|
||||
|
||||
# Download the required files
|
||||
RUN wget -O /app/vmutils-linux-amd64-v${PACKAGE_VERSION}.tar.gz \
|
||||
https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v${PACKAGE_VERSION}/vmutils-linux-amd64-v${PACKAGE_VERSION}.tar.gz && \
|
||||
tar xf vmutils-linux-amd64-v${PACKAGE_VERSION}.tar.gz
|
||||
# Copy resources from the context into the container
|
||||
COPY resources /app/resources
|
||||
|
||||
# Default command to build RPMs
|
||||
CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
|
||||
CMD /app/resources/build.sh
|
||||
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# Download and extract vmutils
|
||||
wget -O /app/vmutils-linux-amd64-v${PACKAGE_VERSION}.tar.gz \
|
||||
https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v${PACKAGE_VERSION}/vmutils-linux-amd64-v${PACKAGE_VERSION}.tar.gz
|
||||
tar xf vmutils-linux-amd64-v${PACKAGE_VERSION}.tar.gz
|
||||
|
||||
# Build the RPM
|
||||
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm
|
||||
Reference in New Issue
Block a user