cic-chain-events/Dockerfile

25 lines
544 B
Docker
Raw Permalink Normal View History

2023-01-06 12:45:33 +01:00
FROM golang:1.19-bullseye as build
2023-01-06 09:07:19 +01:00
2023-01-06 12:45:33 +01:00
WORKDIR /build
COPY . .
RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -o cic-chain-events -ldflags="-s -w" cmd/*.go
2023-01-06 09:07:19 +01:00
2023-01-06 12:45:33 +01:00
FROM debian:bullseye-slim
2023-01-06 09:07:19 +01:00
2023-01-06 12:45:33 +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
COPY --from=build /build/cic-chain-events .
2023-01-06 09:07:19 +01:00
COPY config.toml .
COPY queries.sql .
COPY LICENSE .
COPY migrations migrations/
CMD ["./cic-chain-events"]
2023-01-06 12:45:33 +01:00
EXPOSE 8080