Add monitoring stack files and finalize ARM build cleanups
This commit is contained in:
+20
-13
@@ -1,5 +1,5 @@
|
||||
# Stage 1: Build
|
||||
FROM --platform=$BUILDPLATFORM ubuntu:22.04 AS builder
|
||||
FROM --platform=$TARGETPLATFORM ubuntu:22.04 AS builder
|
||||
|
||||
ARG BUILDPLATFORM
|
||||
ARG TARGETPLATFORM
|
||||
@@ -19,17 +19,23 @@ RUN apt-get update && apt-get install -y \
|
||||
libqt5core5a \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Download appropriate 3proxy binary based on architecture
|
||||
RUN if [ "$TARGETARCH" = "amd64" ]; then \
|
||||
wget -O 3proxy.deb https://github.com/3proxy/3proxy/releases/download/0.9.4/3proxy-0.9.4.x86_64.deb; \
|
||||
elif [ "$TARGETARCH" = "arm64" ]; then \
|
||||
wget -O 3proxy.deb https://github.com/3proxy/3proxy/releases/download/0.9.4/3proxy-0.9.4.aarch64.deb || \
|
||||
{ echo "ARM64 binary not available, using x86_64"; wget -O 3proxy.deb https://github.com/3proxy/3proxy/releases/download/0.9.4/3proxy-0.9.4.x86_64.deb; }; \
|
||||
elif [ "$TARGETARCH" = "arm" ]; then \
|
||||
wget -O 3proxy.deb https://github.com/3proxy/3proxy/releases/download/0.9.4/3proxy-0.9.4.armv7l.deb || \
|
||||
{ echo "ARMv7 binary not available"; exit 1; }; \
|
||||
fi && \
|
||||
dpkg -i 3proxy.deb || true
|
||||
# Download and extract appropriate 3proxy package based on architecture
|
||||
RUN set -eux; \
|
||||
if [ "$TARGETARCH" = "amd64" ]; then \
|
||||
pkg_url="https://github.com/3proxy/3proxy/releases/download/0.9.4/3proxy-0.9.4.x86_64.deb"; \
|
||||
elif [ "$TARGETARCH" = "arm64" ]; then \
|
||||
pkg_url="https://github.com/3proxy/3proxy/releases/download/0.9.4/3proxy-0.9.4.aarch64.deb"; \
|
||||
elif [ "$TARGETARCH" = "arm" ]; then \
|
||||
pkg_url="https://github.com/3proxy/3proxy/releases/download/0.9.4/3proxy-0.9.4.armv7l.deb"; \
|
||||
else \
|
||||
echo "Unsupported architecture: $TARGETARCH"; exit 1; \
|
||||
fi; \
|
||||
wget -O /tmp/3proxy.deb "$pkg_url"; \
|
||||
dpkg-deb -x /tmp/3proxy.deb /tmp/3proxy-root; \
|
||||
test -x /tmp/3proxy-root/bin/3proxy; \
|
||||
install -m 0755 /tmp/3proxy-root/bin/3proxy /usr/local/bin/3proxy; \
|
||||
mkdir -p /usr/local/3proxy; \
|
||||
cp -a /tmp/3proxy-root/usr/local/3proxy/. /usr/local/3proxy/ || true
|
||||
|
||||
# Build 3proxy-eagle in a dedicated source directory
|
||||
RUN git clone https://gitea.darkness.services/acetone/3proxy-eagle.git /src/3proxy-eagle \
|
||||
@@ -54,8 +60,9 @@ RUN apt-get update && apt-get install -y \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy binaries using the correct absolute paths from Stage 1
|
||||
COPY --from=builder /usr/bin/3proxy /usr/bin/3proxy
|
||||
COPY --from=builder /usr/local/bin/3proxy /usr/bin/3proxy
|
||||
COPY --from=builder /src/3proxy-eagle/src/3proxy-eagle /usr/bin/3proxy-eagle
|
||||
COPY --from=builder /usr/local/3proxy /usr/local/3proxy
|
||||
|
||||
# Setup config directories
|
||||
RUN mkdir -p /etc/3proxy /etc/3proxy-eagle/data
|
||||
|
||||
Reference in New Issue
Block a user