From faeb46d188b8c68fdf06c8f660c3920c749ce4ec Mon Sep 17 00:00:00 2001 From: Gabriel Simmer Date: Tue, 30 Jan 2024 19:34:19 +0000 Subject: [PATCH] Add Containerfile --- Containerfile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Containerfile diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..79726a1 --- /dev/null +++ b/Containerfile @@ -0,0 +1,19 @@ +FROM golang:1.21.6-bookworm as build + +ENV CGO_ENABLED=0 \ + GOOS=linux \ + GOFLAGS="-tags=moderncsqlite" + +WORKDIR /build + +COPY . /build + +RUN make soju + +FROM scratch +COPY --from=build /build/soju /app/soju +COPY --from=build /build/sojuctl /app/sojuctl +COPY --from=build /build/sojudb /app/sojudb +COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ + +CMD ["/app/soju"]