diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..93c601b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,28 @@ +FROM ghcr.io/linuxserver/baseimage-alpine:3.20 + +ENV TZ=Etc/GMT + +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +RUN \ + echo "**** install packages ****" && \ + apk --no-cache add \ + binutils-gold \ + openssl \ + zlib \ + libstdc++ \ + dotnet6-sdk \ + aspnetcore6-runtime \ + bash + +ENV DOCKER_MODS=linuxserver/mods:universal-cron + +COPY docker/root/ / + +WORKDIR /app + +COPY --chown=abc:abc . /app + +RUN rm -rf /app/docker + +RUN dotnet publish -c Release -r linux-x64 -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true \ No newline at end of file diff --git a/docker/root/etc/s6-overlay/s6-rc.d/svc-cron/dependencies.d/init-mod-universal-crontab-config b/docker/root/etc/s6-overlay/s6-rc.d/svc-cron/dependencies.d/init-mod-universal-crontab-config new file mode 100644 index 0000000..e69de29 diff --git a/docker/root/etc/s6-overlay/s6-rc.d/svc-cron/run b/docker/root/etc/s6-overlay/s6-rc.d/svc-cron/run new file mode 100755 index 0000000..075a118 --- /dev/null +++ b/docker/root/etc/s6-overlay/s6-rc.d/svc-cron/run @@ -0,0 +1,4 @@ +#!/usr/bin/with-contenv bash + +echo -e "\nStarting cron" +/usr/sbin/crond -b -S -l 0 -L /config/cron.log \ No newline at end of file diff --git a/docker/root/etc/s6-overlay/s6-rc.d/svc-cron/type b/docker/root/etc/s6-overlay/s6-rc.d/svc-cron/type new file mode 100644 index 0000000..3d92b15 --- /dev/null +++ b/docker/root/etc/s6-overlay/s6-rc.d/svc-cron/type @@ -0,0 +1 @@ +oneshot \ No newline at end of file diff --git a/docker/root/etc/s6-overlay/s6-rc.d/svc-cron/up b/docker/root/etc/s6-overlay/s6-rc.d/svc-cron/up new file mode 100644 index 0000000..bb88ca2 --- /dev/null +++ b/docker/root/etc/s6-overlay/s6-rc.d/svc-cron/up @@ -0,0 +1 @@ +/etc/s6-overlay/s6-rc.d/svc-cron/run diff --git a/docker/root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-cron b/docker/root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-cron new file mode 100644 index 0000000..e69de29