-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (27 loc) · 1.18 KB
/
Copy pathDockerfile
File metadata and controls
39 lines (27 loc) · 1.18 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
FROM alpine:3.5
# BFTXHOME is where your genesis.json, key.json and other files including state are stored.
ENV BFTXHOME /go/src/github.com/blockfreight/go-bftx
ENV LOCAL_RPC_CLIENT_ADDRESS tcp://localhost:46657
ENV DOCKER_RPC_CLIENT_ADDRESS tcp://blockfreight:46657
# Create a basecoin user and group first so the IDs get set the same way, even
# as the rest of this may change over time.
RUN addgroup blockfreight && \
adduser -S -G blockfreight blockfreight
RUN mkdir -p $BFTXHOME && \
chown -R blockfreight:blockfreight $BFTXHOME
WORKDIR $BFTXHOME
# Expose the blockfreight home directory as a volume since there's mutable state in there.
VOLUME $BFTXHOME
# jq and curl used for extracting `pub_key` from private validator while
# deploying tendermint with Kubernetes. It is nice to have bash so the users
# could execute bash commands.
RUN apk add --no-cache curl jq
FROM golang:latest
RUN apt-get update && apt-get install -y jq curl
RUN curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
WORKDIR /go/src/github.com/blockfreight/go-bftx
COPY . /go/src/github.com/blockfreight/go-bftx
RUN dep ensure
RUN go install ./cmd/...
EXPOSE 8080
ENTRYPOINT /go/bin/bftx