2020-09-01 15:35:37 +00:00
|
|
|
FROM golang:1.13-alpine AS build-env
|
2019-11-25 19:24:46 +00:00
|
|
|
|
|
|
|
# Set up dependencies
|
2020-09-01 15:35:37 +00:00
|
|
|
# bash, jq, curl for debugging
|
2019-11-25 19:24:46 +00:00
|
|
|
# git, make for installation
|
2020-09-01 15:35:37 +00:00
|
|
|
# libc-dev, gcc, linux-headers, eudev-dev are used for cgo and ledger installation
|
|
|
|
RUN apk add bash git make libc-dev gcc linux-headers eudev-dev jq curl
|
2019-11-25 19:24:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Set working directory for the build
|
|
|
|
WORKDIR /root/kava
|
|
|
|
# default home directory is /root
|
|
|
|
|
|
|
|
COPY go.mod .
|
|
|
|
COPY go.sum .
|
|
|
|
|
|
|
|
RUN go mod download
|
|
|
|
|
|
|
|
# Add source files
|
|
|
|
COPY . .
|
|
|
|
|
|
|
|
# Install kvd, kvcli
|
|
|
|
#ENV LEDGER_ENABLED False
|
|
|
|
RUN make install
|
|
|
|
|
|
|
|
# Run kvd by default, omit entrypoint to ease using container with kvcli
|
|
|
|
CMD ["kvd"]
|