Skip to content

Commit

Permalink
Merge pull request #28 from JimiC/alpine
Browse files Browse the repository at this point in the history
feat: Switch to alpine distro
  • Loading branch information
dangrie158 authored Nov 23, 2024
2 parents 11561b4 + 7b5870a commit 1ebfb40
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 1ebfb40

Please sign in to comment.