From 7b5870a678a38f518b18ac5f5f499dcd69dd510c Mon Sep 17 00:00:00 2001 From: "Jimi (Dimitris) Charalampidis" Date: Mon, 18 Nov 2024 11:30:29 +0200 Subject: [PATCH] Switch to alpine distro --- Dockerfile | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 485c91e..0eeb3cd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,31 +1,37 @@ -FROM denoland/deno:1.46.3 +FROM denoland/deno:alpine-1.46.3 -ENV DOLCE_CUSTOM_TEMPLATE_PATH /var/dolce-custom-templates/ +ENV DOLCE_CUSTOM_TEMPLATE_PATH=/var/dolce-custom-templates/ + +RUN apk update \ + && apk add --no-cache curl \ + && rm -f /var/cache/apk/* WORKDIR /dolce COPY . . RUN mkdir -p /var/run/dolce + # Compile the main app so that it doesn't need to be compiled each startup/entry. RUN deno cache main.ts lib/*.ts ENTRYPOINT [] +SHELL ["/bin/sh", "-c"] CMD deno run \ -# flag is needed for Deno.connect to a Unix Socket (lib/universal-http.ts) + # flag is needed for Deno.connect to a Unix Socket (lib/universal-http.ts) --unstable-http \ -# flag is needed for unstable KV storage + # flag is needed for unstable KV storage --unstable-kv \ -# flag is needed for unstable Cron + # flag is needed for unstable Cron --unstable-cron \ -# flag is needed for unstable Temporal API used in lib/chrono.ts and for blackout windows + # flag is needed for unstable Temporal API used in lib/chrono.ts and for blackout windows --unstable-temporal \ --allow-read="./templates,${DOLCE_RUN_DIRECTORY:-/var/run/dolce/},${DOCKER_HOST:-/var/run/docker.sock},${DOLCE_CUSTOM_TEMPLATE_PATH}" \ --allow-write="${DOLCE_RUN_DIRECTORY:-/var/run/dolce/},${DOCKER_HOST:-/var/run/docker.sock}" \ -# for SmtpNotifier + # for SmtpNotifier --allow-net="discord.com,api.telegram.org,${SMTP_HOSTNAME:-localhost},${APPRISE_HOST:-localhost}$( [ x${DOCKER_TRANSPORT:-unix} != 'xunix' ] && echo ,$DOCKER_HOST )" \ -# for lib/env.ts, obviously + # for lib/env.ts, obviously --allow-env \ -# for Deno.kill in lib/lockfile.ts + # for Deno.kill in lib/lockfile.ts --allow-run \ main.ts