mic-bot/Dockerfile

32 lines
764 B
Docker
Raw Permalink Normal View History

# Do not upgrade to 2.0.3
# https://github.com/denoland/deno/issues/26583
FROM denoland/deno:2.0.2
2024-10-23 16:09:10 +00:00
WORKDIR /app
COPY bot bot
COPY cfg cfg
COPY core core
COPY external external
COPY migrations migrations
COPY repo repo
COPY utils utils
COPY deno.json .
COPY config.ts .
COPY main.ts .
2024-10-23 16:09:10 +00:00
RUN deno cache --allow-import ./main.ts
2024-10-23 16:09:10 +00:00
RUN mkdir bin
# Doesn't work. File read iessues issues
# Suppose related to this issue https://github.com/denoland/deno/issues/20885
# ENV MIC_CONFIG_PATH="/app/config.json"
# RUN deno compile -o ./mic-bin --allow-all ./main.ts
# ENTRYPOINT [ "./mic-bin" ]
2024-10-23 16:09:10 +00:00
# TODO: Replace allow all with a normal permissions
# https://docs.deno.com/runtime/fundamentals/security/#permissions
ENTRYPOINT [ "deno", "run", "--allow-all", "./main.ts" ]