Merge pull request #2598 from skwp/docker-caching

Add source after installing apk packages to avoid breaking docker cache
This commit is contained in:
Johan T. Halseth 2019-10-30 15:47:57 +01:00 committed by GitHub
commit 64e5d06cd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2,9 +2,6 @@ FROM golang:1.13-alpine as builder
MAINTAINER Olaoluwa Osuntokun <lightning.engineering>
# Copy in the local repository to build from.
COPY . /go/src/github.com/lightningnetwork/lnd
# Force Go to use the cgo based DNS resolver. This is required to ensure DNS
# queries required to connect to linked containers succeed.
ENV GODEBUG netdns=cgo
@ -12,8 +9,12 @@ ENV GODEBUG netdns=cgo
# Install dependencies and install/build lnd.
RUN apk add --no-cache --update alpine-sdk \
git \
make \
&& cd /go/src/github.com/lightningnetwork/lnd \
make
# Copy in the local repository to build from.
COPY . /go/src/github.com/lightningnetwork/lnd
RUN cd /go/src/github.com/lightningnetwork/lnd \
&& make \
&& make install tags="signrpc walletrpc chainrpc invoicesrpc routerrpc"