-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
6 changed files
with
84 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
*~ | ||
vendor | ||
Dockerfile* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
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 go install . ./cmd/... | ||
|
||
EXPOSE 9108 | ||
|
||
CMD dcrd |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters