forked from gcash/bchd
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
31 lines (23 loc) · 916 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
28
29
30
31
# Start from a Debian image with the latest version of Go installed
# and a workspace (GOPATH) configured at /go.
FROM golang:1.16
LABEL maintainer="Josh Ellithorpe <quest@mac.com>"
# Copy the local package files to the container's workspace.
ADD . /go/src/github.com/gcash/bchd
# Switch to the correct working directory.
WORKDIR /go/src/github.com/gcash/bchd
# Build the code and the cli client.
RUN go install .
RUN go install ./cmd/bchctl
# Symlink the config to /root/.bchd/bchd.conf
# so bchctl requires fewer flags.
RUN mkdir -p /root/.bchd
RUN ln -s /data/bchd.conf /root/.bchd/bchd.conf
# Create the data volume.
VOLUME ["/data"]
# Set the start command. This starts bchd with
# flags to save the blockchain data and the
# config on a docker volume.
ENTRYPOINT ["bchd", "--addrindex", "--txindex", "-b", "/data", "-C", "/data/bchd.conf"]
# Document that the service listens on port 8333.
EXPOSE 8333