Build linux binary with docker
This commit is contained in:
parent
badcad8d70
commit
a2b2441264
5
Makefile
5
Makefile
|
@ -12,6 +12,11 @@ build:
|
||||||
frontend/build/...
|
frontend/build/...
|
||||||
go build -tags=binassets -o backend/build/cmdui backend/main.go
|
go build -tags=binassets -o backend/build/cmdui backend/main.go
|
||||||
|
|
||||||
|
build_linux:
|
||||||
|
cd backend && docker build . -t cmdui:build
|
||||||
|
cd backend && docker run -i -v ${PWD}/backend/build:/artefacts cmdui:build \
|
||||||
|
go build -o /artefacts/cmdui_linux main.go
|
||||||
|
|
||||||
create_db:
|
create_db:
|
||||||
sqlite3 backend/data/cmdui.db < backend/schema_sqlite.sql
|
sqlite3 backend/data/cmdui.db < backend/schema_sqlite.sql
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
FROM golang:1.9
|
||||||
|
ENV APPDIR $GOPATH/src/github.com/localhots/cmdui/backend
|
||||||
|
ADD . $APPDIR
|
||||||
|
WORKDIR $APPDIR
|
Loading…
Reference in New Issue