HcashOrg / hcd

HC daemon
ISC License
49 stars 28 forks source link

build error:dep ensure #15

Closed nisang closed 5 years ago

nisang commented 6 years ago

$:dep ensure The following issues were found in Gopkg.toml: unable to deduce repository and source type for "golang.org/x/crypto": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/crypto?go-get=1": Get http://golang.org/x/crypto?go-get=1: dial tcp 216.239.37.1:80: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

ProjectRoot name validation failed

this question is my or normal? need help

hunjixin commented 6 years ago

GFW,you'd better use other network or proxy

nisang commented 6 years ago

Dockerfile

FROM golang:1.10.1-alpine3.7
RUN apk update \
        && apk upgrade \
        && apk add --no-cache bash \
        bash-doc \
        bash-completion \
        && rm -rf /var/cache/apk/* \
        && /bin/bash && apk add git

RUN go get -u github.com/golang/dep/cmd/dep

RUN git clone https://github.com/HcashOrg/hcd $GOPATH/src/github.com/HcashOrg/hcd
WORKDIR $GOPATH/src/github.com/HcashOrg/hcd
RUN git checkout Release2.0.3
RUN dep ensure
RUN go install . ./cmd/...

EXPOSE 12008
EXPOSE 12009
EXPOSE 14009
EXPOSE 14008
nisang commented 6 years ago

hcd-docker-builder

image

docker rmi hcd:Release2.0.3

docker pull golang:1.10-stretch

docker pull golang:1.10.1-alpine3.7

build

docker build -t hcd:Release2.0.3 .

$: hcd -u testhcd -P testhcd --testnet

daemon run

docker run -d -p 12008:12008 -p 12009:12009 --name=hcd2.0.3 hcd:Release2.0.3 hcd -u testhcd -P testhcd --testnet

docker run -d -v /root/node1 -p 12008:12008 -p 12009:12009 -p 14009:14009 -p 14008:14008 --name=hcdnode1 hcd:Release2.0.3 hcd -u testhcd -P testhcd setgenerate true

docker run -d -v /root/node2:/root/.hcd -p 12008:12008 -p 12009:12009 -p 14009:14009 -p 14008:14008 --name=hcdnode2 hcd:Release2.0.3 hcd -u testhcd -P testhcd setgenerate true