From cc02e96a135f78af6dde5828cb075b4dd404b6a8 Mon Sep 17 00:00:00 2001 From: James Shubin Date: Thu, 29 Nov 2018 08:22:05 -0500 Subject: [PATCH] engine: resources: Add nodocker build tag Make it easy to disable building docker which is enormous. --- docs/documentation.md | 14 ++++++++++++-- docs/quick-start-guide.md | 7 +++++-- engine/resources/docker_container.go | 2 ++ engine/resources/docker_container_test.go | 2 ++ 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/docs/documentation.md b/docs/documentation.md index d5ba6d7d..284ce519 100644 --- a/docs/documentation.md +++ b/docs/documentation.md @@ -351,18 +351,28 @@ GOTAGS=novirt make build #### Disable augeas support -If you wish to compile mgmt without augeas support, you can use the following command: +If you wish to compile mgmt without augeas support, you can use the following +command: ``` GOTAGS=noaugeas make build ``` +#### Disable docker support + +If you wish to compile mgmt without docker support, you can use the following +command: + +``` +GOTAGS=nodocker make build +``` + #### Combining compile-time flags You can combine multiple tags by using a space-separated list: ``` -GOTAGS="noaugeas novirt" make build +GOTAGS="noaugeas novirt nodocker" make build ``` ## Examples diff --git a/docs/quick-start-guide.md b/docs/quick-start-guide.md index b0acc223..ce9a3d58 100644 --- a/docs/quick-start-guide.md +++ b/docs/quick-start-guide.md @@ -119,8 +119,11 @@ To build `mgmt` without augeas support please run: To build `mgmt` without libvirt support please run: `GOTAGS='novirt' make build` -To build `mgmt` without augeas or libvirt support please run: -`GOTAGS='noaugeas novirt' make build` +To build `mgmt` without docker support please run: +`GOTAGS='nodocker' make build` + +To build `mgmt` without augeas, libvirt or docker support please run: +`GOTAGS='noaugeas novirt nodocker' make build` ## Binary Package Installation diff --git a/engine/resources/docker_container.go b/engine/resources/docker_container.go index eaca2793..399e3513 100644 --- a/engine/resources/docker_container.go +++ b/engine/resources/docker_container.go @@ -15,6 +15,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +// +build !nodocker + package resources import ( diff --git a/engine/resources/docker_container_test.go b/engine/resources/docker_container_test.go index 9bb341b2..83ace3e6 100644 --- a/engine/resources/docker_container_test.go +++ b/engine/resources/docker_container_test.go @@ -15,6 +15,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +// +build !nodocker + package resources import (