thrasher-corp / gocryptotrader

A cryptocurrency trading bot and framework supporting multiple exchanges written in Golang.
MIT License
2.96k stars 793 forks source link

docker-compose build fails for cli #162

Closed marcofranssen closed 5 years ago

marcofranssen commented 5 years ago

See below the build of the cli docker image is failing. Filing it as a bug over here so someone might be able to contribute. Tried quickly by upgrading to new golang:1.10 tag but unfortunatily fails with same error.

Problems seems to be with the COPY . . which does not copy all the source files into the container after a little further investigation.

$ docker-compose build cli
Building cli
Step 1/13 : FROM golang:1.9.4 as build
 ---> a6c306bd0b2f
Step 2/13 : RUN curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
 ---> Using cache
 ---> fb72c0d80591
Step 3/13 : WORKDIR /go/src/gocryptotrader
 ---> Using cache
 ---> 1adea7c99fbf
Step 4/13 : COPY Gopkg.* ./
 ---> Using cache
 ---> 218ec7b27a9e
Step 5/13 : RUN dep ensure -vendor-only
 ---> Using cache
 ---> 74064149d2fb
Step 6/13 : COPY . .
 ---> 1ebe55398f07
Step 7/13 : RUN mv -vn config_example.json config.json  && GOARCH=386 GOOS=linux CGO_ENABLED=0 go install -v  && mv /go/bin/linux_386 /go/bin/gocryptotrader
 ---> Running in f522c43c33e5
exchange.go:8:2: cannot find package "github.com/thrasher-/gocryptotrader/common" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/common (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/common (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/common (from $GOPATH)
main.go:15:2: cannot find package "github.com/thrasher-/gocryptotrader/communications" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/communications (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/communications (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/communications (from $GOPATH)
main.go:16:2: cannot find package "github.com/thrasher-/gocryptotrader/config" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/config (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/config (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/config (from $GOPATH)
helpers.go:8:2: cannot find package "github.com/thrasher-/gocryptotrader/currency" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/currency (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/currency (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/currency (from $GOPATH)
main.go:18:2: cannot find package "github.com/thrasher-/gocryptotrader/currency/forexprovider" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/currency/forexprovider (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/currency/forexprovider (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/currency/forexprovider (from $GOPATH)
helpers.go:9:2: cannot find package "github.com/thrasher-/gocryptotrader/currency/pair" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/currency/pair (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/currency/pair (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/currency/pair (from $GOPATH)
routines.go:11:2: cannot find package "github.com/thrasher-/gocryptotrader/currency/symbol" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/currency/symbol (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/currency/symbol (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/currency/symbol (from $GOPATH)
helpers.go:10:2: cannot find package "github.com/thrasher-/gocryptotrader/currency/translation" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/currency/translation (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/currency/translation (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/currency/translation (from $GOPATH)
exchange.go:9:2: cannot find package "github.com/thrasher-/gocryptotrader/exchanges" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/exchanges (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/exchanges (from $GOPATH)
exchange.go:10:2: cannot find package "github.com/thrasher-/gocryptotrader/exchanges/anx" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/anx (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/exchanges/anx (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/exchanges/anx (from $GOPATH)
exchange.go:11:2: cannot find package "github.com/thrasher-/gocryptotrader/exchanges/binance" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/binance (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/exchanges/binance (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/exchanges/binance (from $GOPATH)
exchange.go:12:2: cannot find package "github.com/thrasher-/gocryptotrader/exchanges/bitfinex" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/bitfinex (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/exchanges/bitfinex (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/exchanges/bitfinex (from $GOPATH)
exchange.go:13:2: cannot find package "github.com/thrasher-/gocryptotrader/exchanges/bitflyer" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/bitflyer (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/exchanges/bitflyer (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/exchanges/bitflyer (from $GOPATH)
exchange.go:14:2: cannot find package "github.com/thrasher-/gocryptotrader/exchanges/bithumb" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/bithumb (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/exchanges/bithumb (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/exchanges/bithumb (from $GOPATH)
exchange.go:15:2: cannot find package "github.com/thrasher-/gocryptotrader/exchanges/bitstamp" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/bitstamp (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/exchanges/bitstamp (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/exchanges/bitstamp (from $GOPATH)
exchange.go:16:2: cannot find package "github.com/thrasher-/gocryptotrader/exchanges/bittrex" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/bittrex (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/exchanges/bittrex (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/exchanges/bittrex (from $GOPATH)
exchange.go:17:2: cannot find package "github.com/thrasher-/gocryptotrader/exchanges/btcc" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/btcc (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/exchanges/btcc (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/exchanges/btcc (from $GOPATH)
exchange.go:18:2: cannot find package "github.com/thrasher-/gocryptotrader/exchanges/btcmarkets" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/btcmarkets (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/exchanges/btcmarkets (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/exchanges/btcmarkets (from $GOPATH)
exchange.go:19:2: cannot find package "github.com/thrasher-/gocryptotrader/exchanges/coinbasepro" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/coinbasepro (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/exchanges/coinbasepro (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/exchanges/coinbasepro (from $GOPATH)
exchange.go:20:2: cannot find package "github.com/thrasher-/gocryptotrader/exchanges/coinut" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/coinut (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/exchanges/coinut (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/exchanges/coinut (from $GOPATH)
exchange.go:21:2: cannot find package "github.com/thrasher-/gocryptotrader/exchanges/exmo" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/exmo (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/exchanges/exmo (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/exchanges/exmo (from $GOPATH)
exchange.go:22:2: cannot find package "github.com/thrasher-/gocryptotrader/exchanges/gemini" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/gemini (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/exchanges/gemini (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/exchanges/gemini (from $GOPATH)
exchange.go:23:2: cannot find package "github.com/thrasher-/gocryptotrader/exchanges/hitbtc" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/hitbtc (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/exchanges/hitbtc (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/exchanges/hitbtc (from $GOPATH)
exchange.go:24:2: cannot find package "github.com/thrasher-/gocryptotrader/exchanges/huobi" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/huobi (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/exchanges/huobi (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/exchanges/huobi (from $GOPATH)
exchange.go:25:2: cannot find package "github.com/thrasher-/gocryptotrader/exchanges/itbit" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/itbit (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/exchanges/itbit (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/exchanges/itbit (from $GOPATH)
exchange.go:26:2: cannot find package "github.com/thrasher-/gocryptotrader/exchanges/kraken" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/kraken (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/exchanges/kraken (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/exchanges/kraken (from $GOPATH)
exchange.go:27:2: cannot find package "github.com/thrasher-/gocryptotrader/exchanges/lakebtc" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/lakebtc (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/exchanges/lakebtc (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/exchanges/lakebtc (from $GOPATH)
exchange.go:28:2: cannot find package "github.com/thrasher-/gocryptotrader/exchanges/liqui" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/liqui (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/exchanges/liqui (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/exchanges/liqui (from $GOPATH)
exchange.go:29:2: cannot find package "github.com/thrasher-/gocryptotrader/exchanges/localbitcoins" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/localbitcoins (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/exchanges/localbitcoins (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/exchanges/localbitcoins (from $GOPATH)
exchange.go:30:2: cannot find package "github.com/thrasher-/gocryptotrader/exchanges/okcoin" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/okcoin (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/exchanges/okcoin (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/exchanges/okcoin (from $GOPATH)
exchange.go:31:2: cannot find package "github.com/thrasher-/gocryptotrader/exchanges/okex" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/okex (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/exchanges/okex (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/exchanges/okex (from $GOPATH)
helpers.go:12:2: cannot find package "github.com/thrasher-/gocryptotrader/exchanges/orderbook" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/orderbook (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/exchanges/orderbook (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/exchanges/orderbook (from $GOPATH)
exchange.go:32:2: cannot find package "github.com/thrasher-/gocryptotrader/exchanges/poloniex" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/poloniex (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/exchanges/poloniex (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/exchanges/poloniex (from $GOPATH)
helpers.go:13:2: cannot find package "github.com/thrasher-/gocryptotrader/exchanges/stats" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/stats (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/exchanges/stats (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/exchanges/stats (from $GOPATH)
helpers.go:14:2: cannot find package "github.com/thrasher-/gocryptotrader/exchanges/ticker" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/ticker (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/exchanges/ticker (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/exchanges/ticker (from $GOPATH)
exchange.go:33:2: cannot find package "github.com/thrasher-/gocryptotrader/exchanges/wex" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/wex (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/exchanges/wex (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/exchanges/wex (from $GOPATH)
exchange.go:34:2: cannot find package "github.com/thrasher-/gocryptotrader/exchanges/yobit" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/yobit (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/exchanges/yobit (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/exchanges/yobit (from $GOPATH)
helpers.go:15:2: cannot find package "github.com/thrasher-/gocryptotrader/portfolio" in any of:
        /go/src/gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/portfolio (vendor tree)
        /usr/local/go/src/github.com/thrasher-/gocryptotrader/portfolio (from $GOROOT)
        /go/src/github.com/thrasher-/gocryptotrader/portfolio (from $GOPATH)
Service 'cli' failed to build: The command '/bin/sh -c mv -vn config_example.json config.json  && GOARCH=386 GOOS=linux CGO_ENABLED=0 go install -v  && mv /go/bin/linux_386 /go/bin/gocryptotrader' returned a non-zero code: 1
shazbert commented 5 years ago

I don't know docker but it seems like the file system wasn't transferred over. So in the Dockerfile I added ADD . /go/src/gocryptotrader on line 2 and I replaced RUN dep ensure -vendor-only with RUN dep ensure -update, it seems to build after that, I don't know effectively though.

shazbert commented 5 years ago
Sending build context to Docker daemon  35.95MB
Step 1/15 : FROM golang:1.9.4 as build
 ---> a6c306bd0b2f
Step 2/15 : ADD . /go/src/gocryptotrader
 ---> b4a3c97cb199
Step 3/15 : RUN curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
 ---> Running in f3fcaa9e0d1d
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed                                                                                                                                                                                                  
100  5110  100  5110    0     0   8652      0 --:--:-- --:--:-- --:--:--  8646                                                                                                                                                                                                 
ARCH = amd64
OS = linux
Will install into /go/bin
Fetching https://github.com/golang/dep/releases/latest..
Release Tag = v0.5.0
Fetching https://github.com/golang/dep/releases/tag/v0.5.0..
Fetching https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64..
Setting executable permissions.
Moving executable to /go/bin/dep
Removing intermediate container f3fcaa9e0d1d
 ---> 808739f89657
Step 4/15 : WORKDIR /go/src/gocryptotrader
Removing intermediate container 9b0a9b8496c3
 ---> 0fb82eb8d2cf
Step 5/15 : COPY Gopkg.* ./
 ---> db5429ef6214
Step 6/15 : RUN ls
 ---> Running in b18ca844e6b6
CONTRIBUTORS
Dockerfile
Gopkg.lock
Gopkg.toml
LICENSE
Makefile
README.md
common
communications
config
config.json
config_example.json
currency
docker-compose.yml
events
exchange.go
exchange_test.go
exchanges
gocryptotrader
helpers.go
helpers_test.go
main.go
main_test.go
node_modules
portfolio
restful_router.go
restful_server.go
routines.go
testdata
tools
vendor
version.go
websocket.go
Removing intermediate container b18ca844e6b6
 ---> 8d0d39243e2e
Step 7/15 : RUN dep ensure -update
 ---> Running in 626a0ced2e46
Removing intermediate container 626a0ced2e46
 ---> 37fb0546d35f
Step 8/15 : COPY . .
 ---> fa096fb9ca74
Step 9/15 : RUN mv -vn config_example.json config.json  && GOARCH=386 GOOS=linux CGO_ENABLED=0 go install -v  && mv /go/bin/linux_386 /go/bin/gocryptotrader
 ---> Running in e2c120899020
runtime/internal/sys
runtime/internal/atomic                                                                                                                                                                                                                                                        
runtime                                                                                                                                                                                                                                                                        
internal/race                                                                                                                                                                                                                                                                  
sync/atomic                                                                                                                                                                                                                                                                    
errors                                                                                                                                                                                                                                                                         
unicode                                                                                                                                                                                                                                                                        
unicode/utf8                                                                                                                                                                                                                                                                   
encoding                                                                                                                                                                                                                                                                       
math                                                                                                                                                                                                                                                                           
unicode/utf16                                                                                                                                                                                                                                                                  
math/bits                                                                                                                                                                                                                                                                      
container/list                                                                                                                                                                                                                                                                 
crypto/subtle                                                                                                                                                                                                                                                                  
crypto/internal/cipherhw                                                                                                                                                                                                                                                       
internal/nettrace                                                                                                                                                                                                                                                              
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/currency/symbol                                                                                                                                                                                                      
sync                                                                                                                                                                                                                                                                           
io                                                                                                                                                                                                                                                                             
internal/singleflight                                                                                                                                                                                                                                                          
syscall                                                                                                                                                                                                                                                                        
bytes                                                                                                                                                                                                                                                                          
crypto/cipher                                                                                                                                                                                                                                                                  
hash                                                                                                                                                                                                                                                                           
strings                                                                                                                                                                                                                                                                        
hash/crc32                                                                                                                                                                                                                                                                     
crypto/hmac                                                                                                                                                                                                                                                                    
strconv                                                                                                                                                                                                                                                                        
math/rand                                                                                                                                                                                                                                                                      
gocryptotrader/vendor/golang.org/x/crypto/pbkdf2                                                                                                                                                                                                                               
bufio                                                                                                                                                                                                                                                                          
vendor/golang_org/x/text/transform                                                                                                                                                                                                                                             
path                                                                                                                                                                                                                                                                           
html                                                                                                                                                                                                                                                                           
encoding/base64                                                                                                                                                                                                                                                                
reflect                                                                                                                                                                                                                                                                        
crypto/aes                                                                                                                                                                                                                                                                     
crypto                                                                                                                                                                                                                                                                         
crypto/rc4                                                                                                                                                                                                                                                                     
crypto/sha512                                                                                                                                                                                                                                                                  
crypto/md5                                                                                                                                                                                                                                                                     
crypto/sha1                                                                                                                                                                                                                                                                    
crypto/sha256                                                                                                                                                                                                                                                                  
time                                                                                                                                                                                                                                                                           
internal/syscall/unix                                                                                                                                                                                                                                                          
gocryptotrader/vendor/golang.org/x/crypto/scrypt                                                                                                                                                                                                                               
internal/poll                                                                                                                                                                                                                                                                  
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/nonce                                                                                                                                                                                                      
os                                                                                                                                                                                                                                                                             
os/signal                                                                                                                                                                                                                                                                      
fmt                                                                                                                                                                                                                                                                            
sort                                                                                                                                                                                                                                                                           
encoding/binary                                                                                                                                                                                                                                                                
encoding/pem                                                                                                                                                                                                                                                                   
path/filepath                                                                                                                                                                                                                                                                  
regexp/syntax                                                                                                                                                                                                                                                                  
crypto/des                                                                                                                                                                                                                                                                     
vendor/golang_org/x/crypto/chacha20poly1305/internal/chacha20                                                                                                                                                                                                                  
vendor/golang_org/x/crypto/poly1305                                                                                                                                                                                                                                            
vendor/golang_org/x/crypto/curve25519                                                                                                                                                                                                                                          
vendor/golang_org/x/crypto/chacha20poly1305                                                                                                                                                                                                                                    
io/ioutil                                                                                                                                                                                                                                                                      
encoding/json                                                                                                                                                                                                                                                                  
encoding/hex                                                                                                                                                                                                                                                                   
context                                                                                                                                                                                                                                                                        
vendor/golang_org/x/net/http2/hpack                                                                                                                                                                                                                                            
math/big                                                                                                                                                                                                                                                                       
flag                                                                                                                                                                                                                                                                           
compress/flate                                                                                                                                                                                                                                                                 
log                                                                                                                                                                                                                                                                            
vendor/golang_org/x/text/unicode/bidi                                                                                                                                                                                                                                          
net                                                                                                                                                                                                                                                                            
vendor/golang_org/x/text/unicode/norm                                                                                                                                                                                                                                          
net/url                                                                                                                                                                                                                                                                        
mime                                                                                                                                                                                                                                                                           
vendor/golang_org/x/text/secure/bidirule                                                                                                                                                                                                                                       
mime/quotedprintable                                                                                                                                                                                                                                                           
net/http/internal                                                                                                                                                                                                                                                              
compress/gzip                                                                                                                                                                                                                                                                  
regexp                                                                                                                                                                                                                                                                         
encoding/csv                                                                                                                                                                                                                                                                   
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/currency/forexprovider/base                                                                                                                                                                                          
encoding/gob                                                                                                                                                                                                                                                                   
text/template/parse                                                                                                                                                                                                                                                            
gocryptotrader/vendor/github.com/streamrail/concurrent-map                                                                                                                                                                                                                     
vendor/golang_org/x/net/idna                                                                                                                                                                                                                                                   
crypto/rand                                                                                                                                                                                                                                                                    
crypto/elliptic                                                                                                                                                                                                                                                                
encoding/asn1                                                                                                                                                                                                                                                                  
crypto/dsa                                                                                                                                                                                                                                                                     
text/template                                                                                                                                                                                                                                                                  
crypto/rsa                                                                                                                                                                                                                                                                     
crypto/x509/pkix                                                                                                                                                                                                                                                               
crypto/ecdsa                                                                                                                                                                                                                                                                   
html/template                                                                                                                                                                                                                                                                  
crypto/x509                                                                                                                                                                                                                                                                    
vendor/golang_org/x/net/lex/httplex                                                                                                                                                                                                                                            
vendor/golang_org/x/net/proxy                                                                                                                                                                                                                                                  
net/textproto                                                                                                                                                                                                                                                                  
mime/multipart                                                                                                                                                                                                                                                                 
crypto/tls                                                                                                                                                                                                                                                                     
net/http/httptrace                                                                                                                                                                                                                                                             
net/smtp                                                                                                                                                                                                                                                                       
net/http                                                                                                                                                                                                                                                                       
gocryptotrader/vendor/github.com/gorilla/mux                                                                                                                                                                                                                                   
gocryptotrader/vendor/github.com/gorilla/websocket                                                                                                                                                                                                                             
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/common                                                                                                                                                                                                               
gocryptotrader/vendor/golang.org/x/net/websocket                                                                                                                                                                                                                               
net/rpc                                                                                                                                                                                                                                                                        
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/currency/forexprovider/currencyconverterapi                                                                                                                                                                          
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/currency/forexprovider/currencylayer                                                                                                                                                                                 
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/currency/forexprovider/fixer.io
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/currency/forexprovider/openexchangerates
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/currency/pair
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/portfolio
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/request
gocryptotrader/vendor/github.com/ugorji/go/codec
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/currency/forexprovider
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/orderbook
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/ticker
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/currency/translation
gocryptotrader/vendor/github.com/toorop/go-pusher
gocryptotrader/vendor/github.com/thrasher-/socketio
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/stats
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/currency
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/config
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/communications/base
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/communications/slack
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/communications/telegram
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/communications/smtpservice
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/communications/smsglobal
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/anx
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/binance
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/bitfinex
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/bitflyer
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/bithumb
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/bitstamp
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/communications
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/bittrex
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/btcc
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/btcmarkets
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/coinbasepro
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/coinut
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/exmo
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/gemini
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/huobi
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/itbit
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/kraken
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/lakebtc
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/liqui
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/localbitcoins
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/okcoin
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/okex
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/wex
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/yobit
gocryptotrader/vendor/github.com/beatgammit/turnpike
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/hitbtc
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/poloniex
gocryptotrader
Removing intermediate container e2c120899020
 ---> 12286539735a
Step 10/15 : FROM alpine:latest
 ---> 11cd0b38bc3c
Step 11/15 : RUN apk update && apk add --no-cache ca-certificates
 ---> Using cache
 ---> 190f83fba796
Step 12/15 : COPY --from=build /go/bin/gocryptotrader /app/
 ---> Using cache
 ---> 966947e39a3f
Step 13/15 : COPY --from=build /go/src/gocryptotrader/config.json /app/
 ---> Using cache
 ---> 68a5c2c57084
Step 14/15 : EXPOSE 9050
 ---> Using cache
 ---> f1c04b9f849f
Step 15/15 : CMD ["/app/gocryptotrader"]
 ---> Using cache
 ---> 30e9f9b0c92d
Successfully built 30e9f9b0c92d
thrasher- commented 5 years ago

Commit https://github.com/thrasher-/gocryptotrader/commit/6b575dd92573842188f97c72ff238d15a0d0f0fc should fix this

Building cli
Step 1/12 : FROM golang:1.10 as build
 ---> d0e7a411e3da
Step 2/12 : RUN curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
 ---> Using cache
 ---> 8dcc5ed817ca
Step 3/12 : WORKDIR /go/src/gocryptotrader
 ---> Using cache
 ---> bf2f30cf730a
Step 4/12 : COPY . .
 ---> 9fcdc87b7a49
Step 5/12 : RUN dep ensure
 ---> Running in 1f6d008974d8
Removing intermediate container 1f6d008974d8
 ---> 7e9379d973fe
Step 6/12 : RUN mv -vn config_example.json config.json  && GOARCH=386 GOOS=linux CGO_ENABLED=0 go install -v  && mv /go/bin/linux_386 /go/bin/gocryptotrader
 ---> Running in d97f616b3288
'config_example.json' -> 'config.json'
errors
internal/race
runtime/internal/atomic
runtime/internal/sys
sync/atomic
unicode
runtime
unicode/utf8
encoding
math
strconv
internal/testlog
unicode/utf16
math/bits
container/list
crypto/subtle
crypto/internal/cipherhw
crypto/rc4
vendor/golang_org/x/crypto/cryptobyte/asn1
internal/nettrace
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/currency/symbol
sync
io
reflect
bytes
syscall
time
encoding/binary
internal/poll
encoding/base64
sort
os
strings
bufio
fmt
hash
hash/crc32
crypto/cipher
encoding/json
flag
context
compress/flate
crypto/aes
internal/syscall/unix
math/rand
compress/gzip
math/big
crypto
crypto/des
crypto/sha512
crypto/hmac
crypto/md5
crypto/sha1
crypto/sha256
encoding/hex
encoding/pem
crypto/rand
crypto/elliptic
encoding/asn1
crypto/rsa
crypto/ecdsa
crypto/dsa
crypto/x509/pkix
vendor/golang_org/x/crypto/cryptobyte
path/filepath
io/ioutil
internal/singleflight
net
net/url
vendor/golang_org/x/crypto/chacha20poly1305/internal/chacha20
vendor/golang_org/x/crypto/poly1305
vendor/golang_org/x/crypto/chacha20poly1305
vendor/golang_org/x/crypto/curve25519
vendor/golang_org/x/net/http2/hpack
vendor/golang_org/x/text/transform
log
vendor/golang_org/x/text/unicode/bidi
vendor/golang_org/x/text/secure/bidirule
vendor/golang_org/x/text/unicode/norm
crypto/x509
vendor/golang_org/x/net/idna
vendor/golang_org/x/net/lex/httplex
crypto/tls
vendor/golang_org/x/net/proxy
mime
mime/quotedprintable
net/textproto
mime/multipart
net/http/internal
path
net/http/httptrace
regexp/syntax
net/http
regexp
encoding/csv
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/currency/forexprovider/base
gocryptotrader/vendor/golang.org/x/crypto/pbkdf2
gocryptotrader/vendor/golang.org/x/crypto/scrypt
net/smtp
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/nonce
gocryptotrader/vendor/github.com/streamrail/concurrent-map
encoding/gob
html
text/template/parse
text/template
html/template
gocryptotrader/vendor/github.com/gorilla/mux
gocryptotrader/vendor/github.com/gorilla/websocket
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/common
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/currency/forexprovider/currencyconverterapi
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/currency/forexprovider/currencylayer
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/currency/forexprovider/fixer.io
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/currency/forexprovider/openexchangerates
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/currency/pair
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/currency/forexprovider
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/portfolio
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/currency
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/orderbook
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/ticker
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/config
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/currency/translation
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/request
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/communications/base
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/communications/slack
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/communications/smsglobal
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/communications/smtpservice
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/communications/telegram
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/communications
gocryptotrader/vendor/golang.org/x/net/websocket
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/anx
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/binance
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/bitfinex
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/bitflyer
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/bithumb
gocryptotrader/vendor/github.com/toorop/go-pusher
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/bitstamp
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/bittrex
gocryptotrader/vendor/github.com/thrasher-/socketio
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/btcmarkets
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/btcc
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/coinbasepro
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/coinut
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/exmo
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/gemini
net/rpc
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/huobi
gocryptotrader/vendor/github.com/ugorji/go/codec
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/itbit
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/kraken
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/lakebtc
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/liqui
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/localbitcoins
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/okcoin
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/okex
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/stats
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/wex
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/yobit
os/signal
gocryptotrader/vendor/github.com/beatgammit/turnpike
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/hitbtc
gocryptotrader/vendor/github.com/thrasher-/gocryptotrader/exchanges/poloniex
gocryptotrader
Removing intermediate container d97f616b3288
 ---> b830425b5dce
Step 7/12 : FROM alpine:latest
 ---> 11cd0b38bc3c
Step 8/12 : RUN apk update && apk add --no-cache ca-certificates
 ---> Using cache
 ---> 43e6ef887d44
Step 9/12 : COPY --from=build /go/bin/gocryptotrader /app/
 ---> Using cache
 ---> 4aad8b2ec10e
Step 10/12 : COPY --from=build /go/src/gocryptotrader/config.json /app/
 ---> Using cache
 ---> 91d5b805a832
Step 11/12 : EXPOSE 9050
 ---> Using cache
 ---> 8556c2bc875a
Step 12/12 : CMD ["/app/gocryptotrader"]
 ---> Using cache
 ---> 78f25bddeba3
Successfully built 78f25bddeba3
Successfully tagged gocryptotrader_cli:latest
Building web
Step 1/12 : FROM node:9-alpine as build
 ---> a56170f59699
Step 2/12 : COPY package.json package-lock.json ./
 ---> Using cache
 ---> bed057cb6a10
Step 3/12 : RUN npm set progress=false  && npm config set depth 0  && npm cache clean --force
 ---> Using cache
 ---> 00dc23cc4713
Step 4/12 : RUN npm i  && mkdir /app  && cp -R ./node_modules /app
 ---> Using cache
 ---> f301b20c14d1
Step 5/12 : WORKDIR /app
 ---> Using cache
 ---> 3f56eaf419d5
Step 6/12 : COPY . .
 ---> Using cache
 ---> c8499536345b
Step 7/12 : RUN $(npm bin)/ng build --prod --build-optimizer
 ---> Using cache
 ---> 599dca0de7b6
Step 8/12 : FROM nginx:1.13.3-alpine
 ---> ba60b24dbad5
Step 9/12 : RUN rm -rf /var/www/html/*
 ---> Using cache
 ---> cf527e784e10
Step 10/12 : COPY nginx/default.conf /etc/nginx/conf.d/
 ---> Using cache
 ---> eccf5247a170
Step 11/12 : COPY --from=build /app/dist /var/www/html
 ---> Using cache
 ---> f2bf3f443938
Step 12/12 : CMD ["nginx", "-g", "daemon off;"]
 ---> Using cache
 ---> 0fe9c8e8c803
Successfully built 0fe9c8e8c803
Successfully tagged gocryptotrader_web:latest
Recreating gocryptotrader_cli_1 ... done
Recreating gocryptotrader_web_1 ... done
ermalguni commented 5 years ago

@thrasher- not exactly. I made some changes to the dockerfile in order to preserve the layers and not have them recreated every time.

ermalguni commented 5 years ago

Pls check my new PR: https://github.com/thrasher-/gocryptotrader/pull/165

shazbert commented 5 years ago

Fix merged via #165