forked from umee-network/peggo
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
27 lines (24 loc) · 859 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
ARG IMG_TAG=latest
# Compile the peggo binary
FROM golang:1.17-alpine AS peggo-builder
WORKDIR /src/app/
COPY go.mod go.sum* ./
RUN go mod download
COPY . .
ENV PACKAGES make git libc-dev bash gcc linux-headers
RUN apk add --no-cache $PACKAGES
RUN make install
# Fetch umeed binary
FROM golang:1.17-alpine AS umeed-builder
ARG UMEE_VERSION=bez/gb-module-poc
ENV PACKAGES curl make git libc-dev bash gcc linux-headers eudev-dev
RUN apk add --no-cache $PACKAGES
WORKDIR /downloads/
RUN git clone https://github.com/umee-network/umee.git
RUN cd umee && git checkout ${UMEE_VERSION} && make build && cp ./build/umeed /usr/local/bin/
# Add to a distroless container
FROM gcr.io/distroless/cc:$IMG_TAG
ARG IMG_TAG
COPY --from=peggo-builder /go/bin/peggo /usr/local/bin/
COPY --from=umeed-builder /usr/local/bin/umeed /usr/local/bin/
EXPOSE 26656 26657 1317 9090