1
0
Fork 0

Build linux binary with docker

This commit is contained in:
Gregory Eremin 2017-11-07 21:08:44 +01:00
parent badcad8d70
commit a2b2441264
2 changed files with 9 additions and 0 deletions

View File

@ -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

4
backend/Dockerfile Normal file
View File

@ -0,0 +1,4 @@
FROM golang:1.9
ENV APPDIR $GOPATH/src/github.com/localhots/cmdui/backend
ADD . $APPDIR
WORKDIR $APPDIR