changed entry point setup

This commit is contained in:
2025-08-04 19:03:30 +02:00
parent 6c5cc014f3
commit f77733be71

View File

@@ -16,7 +16,7 @@ copy ./WatcherAgent/ .
run cargo build --release --target x86_64-unknown-linux-gnu
# Setze Berechtigungen für das Binary
RUN chmod +x /app/target/x86_64-unknown-linux-gnu/release/$BINARY_NAME
run chmod +x /app/target/x86_64-unknown-linux-gnu/release/$BINARY_NAME
# Final Linux image
from debian:bullseye-slim
@@ -28,12 +28,12 @@ run apt-get update && \
&& rm -rf /var/lib/apt/lists/*
# Make binary name configurable
ARG BINARY_NAME
ENV BINARY_NAME=${BINARY_NAME:-WatcherAgent}
arg BINARY_NAME
env BINARY_NAME=${BINARY_NAME:-WatcherAgent}
copy --from=linux-builder /app/target/x86_64-unknown-linux-gnu/release/$BINARY_NAME /usr/local/bin/
# Health check
healthcheck --interval=30s --timeout=3s \
cmd /usr/local/bin/$BINARY_NAME healthcheck || exit 1
entrypoint ["/usr/local/bin/$BINARY_NAME"]
ENTRYPOINT ["/bin/sh", "-c", "/usr/local/bin/${BINARY_NAME}"]