cic-custodial/Dockerfile

23 lines
482 B
Docker
Raw Permalink Normal View History

FROM golang:1.19-bullseye as build
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
FROM debian:bullseye-slim
2022-11-30 10:51:24 +01:00
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/*
2022-11-30 10:51:24 +01:00
2022-12-01 09:09:46 +01:00
WORKDIR /service
2022-11-30 10:51:24 +01:00
COPY --from=build /build/cic-custodial .
2022-11-30 10:51:24 +01:00
COPY config.toml .
2022-12-01 09:09:46 +01:00
CMD ["./cic-custodial"]
2022-11-30 10:51:24 +01:00
EXPOSE 5000