forked from FactomProject/factom-walletd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.alpine
41 lines (26 loc) · 905 Bytes
/
Dockerfile.alpine
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
40
41
FROM golang:1.10-alpine as builder
# Get git
RUN apk add --no-cache curl git
# Get glide
RUN go get github.com/Masterminds/glide
# Where factom-walletd sources will live
WORKDIR $GOPATH/src/github.com/FactomProject/factom-walletd
# Get the dependencies
COPY glide.yaml glide.lock ./
# Install dependencies
RUN glide install -v
# Install dependencies
RUN glide install -v
# Populate the rest of the source
COPY . .
ARG GOOS=linux
# Build and install factom-walletd
RUN go install -ldflags "-X github.com/FactomProject/factom-walletd/vendor/github.com/FactomProject/factom/wallet.WalletVersion=`cat ./vendor/github.com/FactomProject/factom/wallet/VERSION`"
# Now squash everything
FROM alpine:3.6
# Get git
RUN apk add --no-cache ca-certificates curl git
RUN mkdir -p /go/bin
COPY --from=builder /go/bin/factom-walletd /go/bin/factom-walletd
ENTRYPOINT ["/go/bin/factom-walletd"]
EXPOSE 8089