changed entry point setup
This commit is contained in:
@@ -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}"]
|
Reference in New Issue
Block a user