Add 'make docker' target.

The 'make docker' target will verify that docker is installed and run the builder in update and isolation mode.
This commit is contained in:
Jeffrey Townsend
2016-01-26 11:35:05 -08:00
parent 2452d87840
commit bb84a17805
3 changed files with 38 additions and 2 deletions

16
.bashrc Normal file
View File

@@ -0,0 +1,16 @@
############################################################
#
# When running the ONL builder in isolation mode
# $HOME is set to the root of the ONL tree from
# which you entered the builder.
#
# The assumption here is that you are trying to build
# the tree from which you entered the builder, and
# thus we automatically source the setup.env file
# upon starting the shell inside the container.
#
############################################################
. setup.env
echo Ready to build OpenNetworkLinux.

3
.gitignore vendored
View File

@@ -17,5 +17,4 @@ dependmodules.x
.manifest.mk
RELEASE/
.bash_history

View File

@@ -3,6 +3,12 @@
# Rudimentary work in progress.
#
############################################################
ifneq ($(MAKECMDGOALS),docker)
ifndef ONL
$(error Please source the setup.env script at the root of the ONL tree)
endif
include $(ONL)/make/config.mk
all: amd64 ppc
@@ -22,3 +28,18 @@ onl-ppc ppc:
rpc rebuild:
$(ONLPM) --rebuild-pkg-cache
endif
.PHONY: docker
ifndef VERSION
VERSION:=7
endif
docker_check:
@which docker > /dev/null || (echo "*** Docker appears to be missing. Please install docker.io in order to build OpenNetworkLinux." && exit 1)
docker: docker_check
@docker/tools/onlbuilder -$(VERSION) --isolate --hostname onlbuilder$(VERSION) --pull