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