mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-21 14:33:53 +00:00
fix dockerfile for go-sqlite3
This commit is contained in:
parent
6f30b4551c
commit
4f0c986709
|
@ -3,3 +3,5 @@
|
|||
/linode
|
||||
/frontend
|
||||
/desktop
|
||||
/data
|
||||
/output
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
# First stage container
|
||||
FROM golang:1.18.10-alpine3.17 AS builder
|
||||
RUN apk add --no-cache git ca-certificates gcc libc-dev pkgconfig
|
||||
RUN apk add --no-cache git ca-certificates gcc musl-dev libc-dev pkgconfig
|
||||
# gcc is for github.com/mattn/go-sqlite3
|
||||
# ADD . $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
|
||||
|
@ -11,8 +12,9 @@ ENV GOPATH_ORIG=$GOPATH
|
|||
ENV GOPATH=${GO_MOD_CACHE:+$WORKDIR/$GO_MOD_CACHE}
|
||||
ENV GOPATH=${GOPATH:-$GOPATH_ORIG}
|
||||
ENV CGO_ENABLED=1
|
||||
RUN cd $WORKDIR && go get github.com/mattn/go-sqlite3
|
||||
RUN cd $WORKDIR
|
||||
ADD . .
|
||||
RUN go get github.com/mattn/go-sqlite3
|
||||
RUN go build -o $GOPATH_ORIG/bin/bbgo ./cmd/bbgo
|
||||
|
||||
# Second stage container
|
||||
|
|
Loading…
Reference in New Issue
Block a user