From 190479d796aca987b9bb3864f9561d8df4e86ccf Mon Sep 17 00:00:00 2001 From: Suyono Date: Sun, 3 Dec 2023 12:56:26 +1100 Subject: [PATCH] wip: alpine image --- docker/alpine/Dockerfile | 8 ++++++-- docker/alpine/entry.sh | 7 +++++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 docker/alpine/entry.sh diff --git a/docker/alpine/Dockerfile b/docker/alpine/Dockerfile index a39767f..67629ae 100644 --- a/docker/alpine/Dockerfile +++ b/docker/alpine/Dockerfile @@ -15,7 +15,11 @@ COPY --from=builder /root/wingmate/target/release/wmtest-helper-spawner /usr/loc COPY --from=builder /root/wingmate/target/release/wmtest-helper-log /usr/local/bin/wmtest-helper-log ADD docker/alpine/etc/ /etc/ +ADD docker/alpine/entry.sh /usr/local/bin/entry.sh -RUN chmod -R ugo+x /etc/wingmate +RUN chmod -R ugo+x /etc/wingmate && chmod +x /usr/local/bin/entry.sh && apk add tzdata && \ + ln -sv /usr/share/zoneinfo/Australia/Sydney /etc/localtime -CMD [ "/usr/local/bin/init" ] \ No newline at end of file +ENTRYPOINT [ "/usr/local/bin/entry.sh" ] + +CMD [ "/usr/local/bin/wingmate" ] \ No newline at end of file diff --git a/docker/alpine/entry.sh b/docker/alpine/entry.sh new file mode 100644 index 0000000..190a4b6 --- /dev/null +++ b/docker/alpine/entry.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +if [ $# -gt 0 ];then + exec "$@" +else + exec /usr/local/bin/wingmate +fi \ No newline at end of file