Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass arguments of Makefile into Docker #43

Merged
merged 1 commit into from
Dec 26, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ dockers_dir := dockers
build_dockerfile := $(dockers_dir)/Dockerfile.compile
release_dockerfile := $(dockers_dir)/Dockerfile.release
output_dir := out/Default
target_dir := target/
target_dir := target
target_lib_dir := $(target_dir)/lib
target_bin_dir := $(target_dir)/bin

Expand All @@ -12,11 +12,7 @@ docker_workdir := /app/AlphaRTC/

docker_flags := --rm -v `pwd`:$(docker_workdir)

all:
make init
make sync
make app
make release
all: init sync app release

init:
docker build dockers -f $(build_dockerfile) -t $(compile_docker)
Expand All @@ -25,13 +21,18 @@ release:
docker build $(target_dir) -f $(release_dockerfile) -t $(release_docker)

sync:
docker run $(docker_flags) $(compile_docker) make docker-$@
docker run $(docker_flags) $(compile_docker) \
make docker-$@ \
output_dir=$(output_dir)

app:
docker run $(docker_flags) $(compile_docker) make docker-$@
app: peerconnection_serverless

peerconnection_serverless:
docker run $(docker_flags) $(compile_docker) make docker-$@
docker run $(docker_flags) $(compile_docker) \
make docker-$@ \
output_dir=$(output_dir) \
target_lib_dir=$(target_lib_dir) \
target_bin_dir=$(target_bin_dir)

# Docker internal command

Expand Down