refactor: move download logic from Dockerfiles to build.sh scripts
Move complex download commands from Dockerfiles to build.sh scripts for consistency: - pgbouncer_exporter, bind_exporter, exportarr, node_exporter, postgres_exporter: GitHub downloads - vmagent, vmalert: VictoriaMetrics vmutils downloads - vminsert, vmselect, vmstorage: VictoriaMetrics cluster downloads All Dockerfiles now follow the simple template pattern with download logic properly contained in build scripts.
This commit is contained in:
@@ -11,11 +11,9 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
|
||||
ARG PACKAGE_VERSION
|
||||
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
|
||||
|
||||
# Copy nfpm.yaml from the context into the container
|
||||
# Copy resources from the context into the container
|
||||
COPY resources /app/resources
|
||||
|
||||
# Download the required files
|
||||
RUN curl --output - -L https://github.com/prometheus-community/postgres_exporter/releases/download/v${PACKAGE_VERSION}/postgres_exporter-${PACKAGE_VERSION}.linux-amd64.tar.gz | tar --strip-components=1 -xzf -
|
||||
|
||||
# Default command to build RPMs
|
||||
CMD /app/resources/build.sh
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# Download the required files
|
||||
curl --output - -L https://github.com/prometheus-community/postgres_exporter/releases/download/v${PACKAGE_VERSION}/postgres_exporter-${PACKAGE_VERSION}.linux-amd64.tar.gz | tar --strip-components=1 -xzf -
|
||||
|
||||
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm
|
||||
|
||||
Reference in New Issue
Block a user