dcrd/Dockerfile.alpine
orthomind 6c9bc1d890 docker: Add dockerfiles for running dcrd nodes.
This removes existing dockerfiles and adds new ones.  The removed
dockerfiles were originally used for building the testing images, but
now those images are generated by Docker Hub from the decred/dcrdocker
dockerfiles.

The new dockerfiles provide a way to build an image for running dcrd.
The main Dockerfile runs dcrd inside the same image used for building.
Dockerfile.alpine provides an alternative image that copies the built
files into an alpine based container, removing all build related content
and providing a securer and slimmer alternative.
2018-07-07 05:33:53 -05:00

20 lines
323 B
Docker

# Build image
FROM golang:1.10.3
WORKDIR /go/src/github.com/decred/dcrd
COPY . .
RUN go get -u github.com/golang/dep/cmd/dep
RUN dep ensure
RUN CGO_ENABLED=0 GOOS=linux go install . ./cmd/...
# Production image
FROM alpine:3.6
RUN apk add --no-cache ca-certificates
COPY --from=0 /go/bin/* /bin/
EXPOSE 9108
CMD dcrd