Skip to content

Commit 4f0c986

Browse files
committed
fix dockerfile for go-sqlite3
1 parent 6f30b45 commit 4f0c986

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33
/linode
44
/frontend
55
/desktop
6+
/data
7+
/output

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
# First stage container
22
FROM golang:1.18.10-alpine3.17 AS builder
3-
RUN apk add --no-cache git ca-certificates gcc libc-dev pkgconfig
3+
RUN apk add --no-cache git ca-certificates gcc musl-dev libc-dev pkgconfig
44
# gcc is for github.com/mattn/go-sqlite3
55
# ADD . $GOPATH/src/github.com/c9s/bbgo
66

7+
78
WORKDIR $GOPATH/src/github.com/c9s/bbgo
89
ARG GO_MOD_CACHE
910
ENV WORKDIR=$GOPATH/src/github.com/c9s/bbgo
1011
ENV GOPATH_ORIG=$GOPATH
1112
ENV GOPATH=${GO_MOD_CACHE:+$WORKDIR/$GO_MOD_CACHE}
1213
ENV GOPATH=${GOPATH:-$GOPATH_ORIG}
1314
ENV CGO_ENABLED=1
14-
RUN cd $WORKDIR && go get github.com/mattn/go-sqlite3
15+
RUN cd $WORKDIR
1516
ADD . .
17+
RUN go get github.com/mattn/go-sqlite3
1618
RUN go build -o $GOPATH_ORIG/bin/bbgo ./cmd/bbgo
1719

1820
# Second stage container

0 commit comments

Comments
 (0)