From 9f9ed9c61eb0ec2dcef0f0fced8fa090d7847790 Mon Sep 17 00:00:00 2001 From: Tyler Date: Thu, 9 Jul 2020 22:09:58 -0400 Subject: [PATCH] Add entrypoint, -dir parameter --- Dockerfile | 7 +++++-- docker/entrypoint.sh | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 docker/entrypoint.sh diff --git a/Dockerfile b/Dockerfile index 215d7b9..ce50539 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,9 @@ RUN cd /go/src; go build -o sleeper FROM alpine -COPY --from=builder /go/src/sleeper /sleeper +ADD docker/entrypoint.sh /entrypoint.sh +COPY --from=builder /go/src/sleeper /usr/bin/sleeper -CMD ["/sleeper"] \ No newline at end of file +RUN chmod +x /entrypoint.sh + +ENTRYPOINT "/entrypoint.sh" \ No newline at end of file diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh new file mode 100644 index 0000000..96de7af --- /dev/null +++ b/docker/entrypoint.sh @@ -0,0 +1,2 @@ +#!/bin/sh +/usr/bin/sleeper -dir ${SERVER_PATH:/data} \ No newline at end of file