2023-03-01 12:19:57 +01:00
|
|
|
# build
|
|
|
|
FROM golang:1-bullseye as build
|
2022-12-01 10:19:47 +01:00
|
|
|
WORKDIR /build
|
|
|
|
COPY . .
|
2023-02-20 11:26:21 +01:00
|
|
|
RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -o cic-custodial -ldflags="-s -w" cmd/service/*.go
|
2022-12-01 10:19:47 +01:00
|
|
|
|
2023-03-01 12:19:57 +01:00
|
|
|
# main
|
2022-12-01 10:19:47 +01:00
|
|
|
FROM debian:bullseye-slim
|
2022-12-01 09:09:46 +01:00
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
RUN set -x && \
|
|
|
|
apt-get update && \
|
|
|
|
apt-get install -y ca-certificates && \
|
|
|
|
rm -rf /var/cache/apt/archives /var/lib/apt/lists/*
|
|
|
|
WORKDIR /service
|
2022-12-01 10:19:47 +01:00
|
|
|
COPY --from=build /build/cic-custodial .
|
2023-03-01 12:19:57 +01:00
|
|
|
COPY migrations migrations/
|
2022-11-30 10:51:24 +01:00
|
|
|
COPY config.toml .
|
2023-02-28 11:37:30 +01:00
|
|
|
COPY queries.sql .
|
2022-12-01 09:09:46 +01:00
|
|
|
CMD ["./cic-custodial"]
|
2022-11-30 10:51:24 +01:00
|
|
|
EXPOSE 5000
|