diff --git a/Makefile b/Makefile index 0608d8304..c30dceae0 100644 --- a/Makefile +++ b/Makefile @@ -31,8 +31,9 @@ TRAEFIK_ENVS := \ TRAEFIK_MOUNT := -v "$(CURDIR)/$(BIND_DIR):/go/src/github.com/containous/traefik/$(BIND_DIR)" DOCKER_RUN_OPTS := $(TRAEFIK_ENVS) $(TRAEFIK_MOUNT) "$(TRAEFIK_DEV_IMAGE)" -DOCKER_RUN_TRAEFIK := docker run $(INTEGRATION_OPTS) -it $(DOCKER_RUN_OPTS) -DOCKER_RUN_TRAEFIK_NOTTY := docker run $(INTEGRATION_OPTS) -i $(DOCKER_RUN_OPTS) +DOCKER_NON_INTERACTIVE ?= false +DOCKER_RUN_TRAEFIK := docker run $(INTEGRATION_OPTS) $(if $(DOCKER_NON_INTERACTIVE), , -it) $(DOCKER_RUN_OPTS) +DOCKER_RUN_TRAEFIK_NOTTY := docker run $(INTEGRATION_OPTS) $(if $(DOCKER_NON_INTERACTIVE), , -i) $(DOCKER_RUN_OPTS) PRE_TARGET ?= build-dev-image diff --git a/docs/content/contributing/building-testing.md b/docs/content/contributing/building-testing.md index d55e5971d..c69fcdec8 100644 --- a/docs/content/contributing/building-testing.md +++ b/docs/content/contributing/building-testing.md @@ -16,6 +16,8 @@ For changes to its dependencies, the `dep` dependency management tool is require Run make with the `binary` target. This will create binaries for the Linux platform in the `dist` folder. +In case when you run build on CI, you may probably want to run docker in non-interactive mode. To achieve that define `DOCKER_NON_INTERACTIVE=true` environment variable. + ```bash $ make binary docker build -t traefik-webui -f webui/Dockerfile webui