mirror of
https://github.com/grassrootseconomics/cic-chain-events.git
synced 2024-12-22 19:57:31 +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 \
|
||||
ca-certificates && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
WORKDIR /build
|
||||
COPY . .
|
||||
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 queries.sql .
|
||||
COPY LICENSE .
|
||||
COPY migrations migrations/
|
||||
|
||||
CMD ["./cic-chain-events"]
|
||||
|
||||
EXPOSE 8080
|
Loading…
Reference in New Issue
Block a user