mirror of
https://github.com/FlipsideCrypto/dcrd.git
synced 2026-02-06 10:56:47 +00:00
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.
20 lines
323 B
Docker
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
|