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:
16
Makefile.docker
Normal file
16
Makefile.docker
Normal 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
|
||||
|
20
cmd/alice-lg/Makefile.docker
Normal file
20
cmd/alice-lg/Makefile.docker
Normal 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
|
||||
|
Reference in New Issue
Block a user