Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# CI workflows
.github/

# flyctl launch added from .gitignore
# Based on https://raw.githubusercontent.com/github/gitignore/main/Node.gitignore

Expand Down
15 changes: 10 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM oven/bun AS build
FROM docker.io/oven/bun:1-alpine AS builder

RUN apk add python3 build-base

WORKDIR /app

Expand All @@ -9,14 +11,17 @@ RUN bun install --frozen-lockfile

COPY src ./src

RUN bun build ./src/index.ts --compile --outfile bot
RUN bun build --compile --sourcemap --outfile bot ./src/index.ts

FROM docker.io/alpine:3

FROM ubuntu:22.04
# For some reason, Bun single-file executables targeting musl require libstdc++
RUN apk --no-cache add libstdc++

WORKDIR /app

COPY --from=build /app/bot /app/bot
COPY --from=builder /app/bot /app/bot

ENV TZ=America/Indiana/Indianapolis

CMD ["/app/bot"]
ENTRYPOINT ["/app/bot"]