bin/build automatically generates

This commit is contained in:
2015-12-05 22:43:48 +01:00
parent 2a05f52450
commit e4b0f7b975
17 changed files with 21 additions and 94 deletions

View File

@@ -1 +1,19 @@
make -f $DOCKER_HOME/images/$1.mk build
FILE=$DOCKER_HOME/images/$1.mk
echo $FILE
if [[ ! -e $FILE ]]; then
DELETE=true
FILE="$(mktemp)"
echo 123
cat <<- EOF > $FILE
include \$(DOCKER_HOME)/build/Makefile
NAME = $1
VERSION = latest
build: $1
EOF
fi
make -f $FILE build
if [ ! -z ${DELETE+x} ]; then
rm $FILE
fi

View File

@@ -38,17 +38,16 @@ endef
all: build bin service clean
build: prepare base
$(call script,cleanup)
@echo 'RUN chmod +x /opt/init.d/*' >> ${FILE}
@echo 'CMD ["/opt/init"]' >> ${FILE}
@echo ENV MODE $(MODE) >> ${FILE}
$(call script,cleanup)
@docker build -t $(NAME):$(VERSION) $(ARGS) ${BASE}
prepare:
@echo FROM $(FROM) > ${FILE}
@echo ENV MODE $(MODE) >> ${FILE}
$(call add,config,/build/config)
$(call add,init,/opt/init)
@echo 'RUN chmod +x /opt/init' >> ${FILE}
$(call script,prepare)
clean:

View File

@@ -1,6 +0,0 @@
include $(DOCKER_HOME)/build/Makefile
NAME = automysqlbackup
VERSION = latest
build: automysqlbackup

View File

@@ -1,6 +0,0 @@
include $(DOCKER_HOME)/build/Makefile
NAME = backintime
VERSION = latest
build: backintime

View File

@@ -1,6 +0,0 @@
include $(DOCKER_HOME)/build/Makefile
NAME = base
VERSION = latest
build: base

View File

@@ -1,6 +0,0 @@
include $(DOCKER_HOME)/build/Makefile
NAME = btsync
VERSION = latest
build: btsync

View File

@@ -1,6 +0,0 @@
include $(DOCKER_HOME)/build/Makefile
NAME = couchpotato
VERSION = latest
build: couchpotato

View File

@@ -1,6 +0,0 @@
include $(DOCKER_HOME)/build/Makefile
NAME = ftp
VERSION = latest
build: ftp

View File

@@ -1,6 +0,0 @@
include $(DOCKER_HOME)/build/Makefile
NAME = hamachi
VERSION = latest
build: hamachi

View File

@@ -1,6 +0,0 @@
include $(DOCKER_HOME)/build/Makefile
NAME = headphones
VERSION = latest
build: headphones

View File

@@ -1,6 +0,0 @@
include $(DOCKER_HOME)/build/Makefile
NAME = mysql
VERSION = latest
build: mysql

View File

@@ -1,6 +0,0 @@
include $(DOCKER_HOME)/build/Makefile
NAME = redis
VERSION = latest
build: redis

View File

@@ -1,6 +0,0 @@
include $(DOCKER_HOME)/build/Makefile
NAME = sabnzbd
VERSION = latest
build: sabnzbd

View File

@@ -1,6 +0,0 @@
include $(DOCKER_HOME)/build/Makefile
NAME = sickbeard
VERSION = latest
build: sickbeard

View File

@@ -1,6 +0,0 @@
include $(DOCKER_HOME)/build/Makefile
NAME = sonarr
VERSION = latest
build: sonarr

View File

@@ -1,6 +0,0 @@
include $(DOCKER_HOME)/build/Makefile
NAME = testing
VERSION = latest
build: testing

View File

@@ -1,6 +0,0 @@
include $(DOCKER_HOME)/build/Makefile
NAME = transmission
VERSION = latest
build: transmission