-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from JimiC/alpine
feat: Switch to alpine distro
- Loading branch information
Showing
1 changed file
with
15 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |