mirror of
https://github.com/grassrootseconomics/cic-custodial.git
synced 2024-11-22 06:16:45 +01:00
21 lines
535 B
Docker
21 lines
535 B
Docker
# build
|
|
FROM golang:1-bullseye as build
|
|
WORKDIR /build
|
|
COPY . .
|
|
RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -o cic-custodial -ldflags="-s -w" cmd/service/*.go
|
|
|
|
# main
|
|
FROM debian:bullseye-slim
|
|
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
|
|
COPY --from=build /build/cic-custodial .
|
|
COPY migrations migrations/
|
|
COPY config.toml .
|
|
COPY queries.sql .
|
|
CMD ["./cic-custodial"]
|
|
EXPOSE 5000
|