Skip to content
This repository has been archived by the owner on Apr 7, 2020. It is now read-only.

Commit

Permalink
Upgrade BTCD and version-lock (#122)
Browse files Browse the repository at this point in the history
* update dockerfile to handle 1.11 go modules build

* use lnd version for upgrading

* version-lock ltcd and btcd

* move lnd back to our master fork branch

* use commit sha directly
  • Loading branch information
treygriffith committed Dec 5, 2018
1 parent 26eb13a commit ed3ac7e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
8 changes: 3 additions & 5 deletions docker/btcd/Dockerfile
@@ -1,11 +1,10 @@
FROM golang:1.10-alpine as builder
FROM golang:1.11-alpine as builder

LABEL maintainer="sparkswap <dev@sparkswap.com>"

# Install build dependencies such as git and glide.
RUN apk add --no-cache \
git \
&& go get -u github.com/Masterminds/glide
git

WORKDIR $GOPATH/src/github.com/btcsuite/btcd

Expand All @@ -18,8 +17,7 @@ RUN : "${COMMIT_SHA:?COMMIT_SHA Build argument needs to be set.}"
# Grab and install the latest version of btcd
RUN git clone https://github.com/btcsuite/btcd . \
&& git checkout ${COMMIT_SHA} \
&& glide install \
&& go install . ./cmd/...
&& CGO_ENABLED=0 GO111MODULE=on go install . ./cmd/...

# Start a new image
FROM alpine as final
Expand Down
6 changes: 2 additions & 4 deletions scripts/build-images.sh
Expand Up @@ -31,10 +31,8 @@ docker build -t sparkswap_lnd_ltc ./docker/lnd --build-arg NODE=$LND_LTC_NODE --
if [[ "$ARG" == "local" ]]; then
LTCD_CERT_HOST=${LTCD_CERT_HOST:-host.docker.internal}
BTCD_CERT_HOST=${BTCD_CERT_HOST:-host.docker.internal}
LTCD_VERSION='master'
BTCD_VERSION='master'
LTCD_COMMIT_SHA=`git ls-remote git://github.com/ltcsuite/ltcd | grep "refs/heads/$LTCD_VERSION$" | cut -f 1`
BTCD_COMMIT_SHA=`git ls-remote git://github.com/btcsuite/btcd | grep "refs/heads/$BTCD_VERSION$" | cut -f 1`
LTCD_COMMIT_SHA='01737289d815e0e32c91e55593ba2fbd8d090b2c'
BTCD_COMMIT_SHA='7d2daa5bfef28c5e282571bc06416516936115ee'
docker build -t sparkswap_btcd ./docker/btcd --build-arg COMMIT_SHA=$BTCD_COMMIT_SHA --build-arg CERT_HOST=$BTCD_CERT_HOST
docker build -t sparkswap_ltcd ./docker/ltcd --build-arg COMMIT_SHA=$LTCD_COMMIT_SHA --build-arg CERT_HOST=$LTCD_CERT_HOST
else
Expand Down

0 comments on commit ed3ac7e

Please sign in to comment.