mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-21 22:43:52 +00:00
fix docker mod cache
This commit is contained in:
parent
9e1476dcb1
commit
2efdf82915
|
@ -3,12 +3,16 @@ FROM golang:1.15-alpine3.12 AS builder
|
|||
RUN apk add --no-cache git ca-certificates gcc libc-dev pkgconfig
|
||||
# gcc is for github.com/mattn/go-sqlite3
|
||||
RUN go get -u github.com/c9s/goose/cmd/goose
|
||||
ADD . $GOPATH/src/github.com/c9s/bbgo
|
||||
# ADD . $GOPATH/src/github.com/c9s/bbgo
|
||||
# WORKDIR $GOPATH/src/github.com/c9s/bbgo
|
||||
|
||||
WORKDIR $GOPATH/src/github.com/c9s/bbgo
|
||||
ARG GO_MOD_CACHE
|
||||
ENV WORKDIR=$GOPATH/src/github.com/c9s/bbgo
|
||||
ENV GOPATH_ORIG=$GOPATH
|
||||
ENV GOPATH=${GO_MOD_CACHE:+$PWD/$GO_MOD_CACHE}
|
||||
ENV GOPATH=${GO_MOD_CACHE:+$WORKDIR/$GO_MOD_CACHE}
|
||||
ENV GOPATH=${GOPATH:-$GOPATH_ORIG}
|
||||
ADD . .
|
||||
RUN go build -o $GOPATH_ORIG/bin/bbgo ./cmd/bbgo
|
||||
|
||||
# Second stage container
|
||||
|
|
1
Makefile
1
Makefile
|
@ -30,5 +30,6 @@ dist: bin-dir bbgo-linux bbgo-darwin
|
|||
docker:
|
||||
GOPATH=$(PWD)/.mod go mod download
|
||||
docker build --build-arg GO_MOD_CACHE=.mod --tag yoanlin/bbgo .
|
||||
bash -c "[[ -n $(DOCKER_TAG) ]] && docker tag yoanlin/bbgo yoanlin/bbgo:$(DOCKER_TAG)"
|
||||
|
||||
.PHONY: dist
|
||||
|
|
|
@ -233,6 +233,14 @@ streambook.BindStream(stream)
|
|||
|
||||
## Helm Chart
|
||||
|
||||
Prepare your docker image locally (you can also use the docker image from docker hub):
|
||||
|
||||
```
|
||||
make docker DOCKER_TAG=1.16.0
|
||||
```
|
||||
|
||||
The docker tag version number is from the file [Chart.yaml](charts/bbgo/Chart.yaml)
|
||||
|
||||
Prepare your secret:
|
||||
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue
Block a user