mirror of
https://github.com/grassrootseconomics/cic-chain-events.git
synced 2024-11-25 16:46:45 +01:00
ci: fix Docker CGO build
This commit is contained in:
parent
d9866196f9
commit
06d2677071
22
Dockerfile
22
Dockerfile
@ -1,15 +1,25 @@
|
|||||||
FROM debian:11-slim
|
FROM golang:1.19-bullseye as build
|
||||||
|
|
||||||
RUN set -x && apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
WORKDIR /build
|
||||||
ca-certificates && \
|
COPY . .
|
||||||
rm -rf /var/lib/apt/lists/*
|
RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -o cic-chain-events -ldflags="-s -w" cmd/*.go
|
||||||
|
|
||||||
WORKDIR /cic-chain-events
|
FROM debian:bullseye-slim
|
||||||
|
|
||||||
COPY cic-chain-events .
|
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 .
|
||||||
COPY config.toml .
|
COPY config.toml .
|
||||||
COPY queries.sql .
|
COPY queries.sql .
|
||||||
COPY LICENSE .
|
COPY LICENSE .
|
||||||
COPY migrations migrations/
|
COPY migrations migrations/
|
||||||
|
|
||||||
CMD ["./cic-chain-events"]
|
CMD ["./cic-chain-events"]
|
||||||
|
|
||||||
|
EXPOSE 8080
|
Loading…
Reference in New Issue
Block a user