Просмотр исходного кода

Allow to add any args when doing a make run

`make DOCKERD_ARGS=--init binary run` should start the daemon with
`--init` as flags (with any other "automagically" added ones).

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Vincent Demeester 7 лет назад
Родитель
Сommit
d2af0d96e3
2 измененных файлов с 3 добавлено и 2 удалено
  1. 1 0
      Makefile
  2. 2 2
      hack/make/run

+ 1 - 0
Makefile

@@ -43,6 +43,7 @@ DOCKER_ENVS := \
 	-e DOCKER_REMAP_ROOT \
 	-e DOCKER_STORAGE_OPTS \
 	-e DOCKER_USERLANDPROXY \
+	-e DOCKERD_ARGS \
 	-e TEST_INTEGRATION_DIR \
 	-e TESTDIRS \
 	-e TESTFLAGS \

+ 2 - 2
hack/make/run

@@ -28,9 +28,9 @@ if [ -n "$DOCKER_PORT" ]; then
 	listen_port="${ports[-1]}"
 fi
 
-extra_params=""
+extra_params="$DOCKERD_ARGS"
 if [ "$DOCKER_REMAP_ROOT" ]; then
-	extra_params="--userns-remap $DOCKER_REMAP_ROOT"
+	extra_params="$extra_params --userns-remap $DOCKER_REMAP_ROOT"
 fi
 
 args="--debug \