Makefile: Fix bug where network was not disabled

This commit moves the include statement to the bottom of the file to
ensure that all variables are set before conditionals are evaluated.

I also changed the ifndef NETWORK to ifdef NETWORK as the former was
incorrect. We want `NET_OPTS="--network=none"` in cases where NETWORK is
not defined.

Fixes: #2134

Signed-off-by: Dave Tucker <dt@docker.com>
This commit is contained in:
Dave Tucker 2017-06-30 11:55:08 +01:00
parent 736713dc8f
commit 5a225b9dc5
26 changed files with 51 additions and 51 deletions

View File

@ -1,3 +1,3 @@
include ../package.mk
IMAGE?=auditd
include ../package.mk

View File

@ -1,4 +1,4 @@
include ../package.mk
IMAGE=binfmt
DEPS=main.go $(wildcard etc/binmft.d/*)
include ../package.mk

View File

@ -1,3 +1,3 @@
include ../package.mk
IMAGE=ca-certificates
include ../package.mk

View File

@ -1,4 +1,4 @@
include ../package.mk
IMAGE=containerd
NETWORK=1
include ../package.mk

View File

@ -1,4 +1,4 @@
include ../package.mk
IMAGE=dhcpcd
DEPS=dhcpcd.conf $(wildcard usr/lib/dhcpcd/dhcpcd-hooks/*)
include ../package.mk

View File

@ -1,4 +1,4 @@
include ../package.mk
IMAGE=docker-ce
NETWORK=1
include ../package.mk

View File

@ -1,4 +1,4 @@
include ../package.mk
IMAGE=format
DEPS=format.sh
include ../package.mk

View File

@ -1,4 +1,4 @@
include ../package.mk
IMAGE=getty
DEPS=usr/bin/rungetty.sh $(wildcard etc/*) $(wildcard etc/init.d/*)
include ../package.mk

View File

@ -1,4 +1,4 @@
include ../package.mk
IMAGE=init
DEPS=init usermode-helper.c $(wildcard etc/*) $(wildcard etc/init.d/*)
include ../package.mk

View File

@ -1,4 +1,4 @@
include ../package.mk
IMAGE=metadata
DEPS=$(wildcard *.go)
include ../package.mk

View File

@ -1,4 +1,4 @@
include ../package.mk
IMAGE=mkimage
DEPS=mkimage.sh
include ../package.mk

View File

@ -1,4 +1,4 @@
include ../package.mk
IMAGE=mount
DEPS=mount.sh
include ../package.mk

View File

@ -1,3 +1,3 @@
include ../package.mk
IMAGE=node_exporter
include ../package.mk

View File

@ -1,3 +1,3 @@
include ../package.mk
IMAGE=open-vm-tools
include ../package.mk

View File

@ -1,4 +1,4 @@
include ../package.mk
IMAGE=openntpd
DEPS=etc/ntpd.conf
include ../package.mk

View File

@ -21,7 +21,7 @@ endif
# Get a release tag, if present
RELEASE=$(shell git tag -l --points-at HEAD)
ifndef $(NETWORK)
ifdef NETWORK
NET_OPT=
else
NET_OPT=--network=none

View File

@ -1,3 +1,3 @@
include ../package.mk
IMAGE=qemu-ga
include ../package.mk

View File

@ -1,3 +1,3 @@
include ../package.mk
IMAGE=rngd
include ../package.mk

View File

@ -1,4 +1,4 @@
include ../package.mk
IMAGE=runc
NETWORK=1
include ../package.mk

View File

@ -1,4 +1,4 @@
include ../package.mk
IMAGE=sshd
DEPS=etc/motd etc/ssh/sshd_config usr/bin/ssh.sh
include ../package.mk

View File

@ -1,4 +1,4 @@
include ../package.mk
IMAGE=swap
DEPS=swap.sh
include ../package.mk

View File

@ -1,4 +1,4 @@
include ../package.mk
IMAGE=sysctl
DEPS=main.go
include ../package.mk

View File

@ -1,4 +1,4 @@
include ../package.mk
IMAGE=sysfs
DEPS=main.go
include ../package.mk

View File

@ -1,4 +1,4 @@
include ../package.mk
IMAGE=trim-after-delete
DEPS=$(wildcard *.go)
include ../package.mk

View File

@ -1,5 +1,5 @@
include ../package.mk
IMAGE=vpnkit-forwarder
DEPS=$(wildcard *.go)
NETWORK=1
include ../package.mk

View File

@ -1,5 +1,5 @@
include ../package.mk
IMAGE=vsudd
DEPS=$(wildcard *.go)
NETWORK=1
include ../package.mk