1
0
mirror of https://github.com/alice-lg/alice-lg.git synced 2024-05-11 05:55:03 +00:00

build a local binary using docker

This commit is contained in:
Annika Hannig
2021-04-16 11:10:39 +02:00
parent 7711de1646
commit eef74b7e9b
2 changed files with 36 additions and 0 deletions

16
Makefile.docker Normal file
View File

@ -0,0 +1,16 @@
# Build a local alice binary using docker.
DOCKER := docker
all: alice
cp cmd/alice-lg/alice-lg-* bin/
client:
$(MAKE) -C client/ -f Makefile.docker
alice: client
$(MAKE) -C cmd/alice-lg -f Makefile.docker
.PHONY: client alice

View File

@ -0,0 +1,20 @@
#
# Build alice using a dockerized go version
#
DOCKER := docker
DOCKER_CONTAINER := alice-lg-build
DOCKER_IMAGE := golang:1.16
DOCKER_EXEC := $(DOCKER) run --rm -t -i \
-a stdin -a stdout -a stderr \
-v `pwd`/../../:/src/alice-lg \
--name $(DOCKER_CONTAINER) \
--workdir /src/alice-lg/cmd/alice-lg \
$(DOCKER_IMAGE)
all:
$(DOCKER_EXEC) make static