From 2a05f524502a40ad7fdc8494a89772075e244aa8 Mon Sep 17 00:00:00 2001 From: Rik Veenboer Date: Sat, 5 Dec 2015 21:34:03 +0100 Subject: [PATCH] Remove unused code from Makefile --- build/Makefile | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/build/Makefile b/build/Makefile index cdebec6..b679e0e 100644 --- a/build/Makefile +++ b/build/Makefile @@ -5,7 +5,6 @@ FILE = $(BASE)/Dockerfile TMP = /opt/tmp FROM = ubuntu:trusty INTERFACE = eth0 -PORT = 8000 MODE = normal ARGS = --rm=false --no-cache=false include $(wildcard $(HOME)/build/make/*.mk) @@ -42,51 +41,21 @@ build: prepare base $(call script,cleanup) @echo 'RUN chmod +x /opt/init.d/*' >> ${FILE} @echo 'CMD ["/opt/init"]' >> ${FILE} - @$(shell cd ${BASE} && python -m SimpleHTTPServer $(PORT) > /dev/null &) @docker build -t $(NAME):$(VERSION) $(ARGS) ${BASE} - @kill -9 $(lsof -i tcp:$(PORT) -t) prepare: @echo FROM $(FROM) > ${FILE} @echo ENV MODE $(MODE) >> ${FILE} - @$(eval HOST_ADDR := $(shell ifconfig $(INTERFACE) | grep 'inet addr:' | cut -d: -f2 | awk '{print $$1}')) - @echo ENV HOST_ADDR $(HOST_ADDR) >> ${FILE} - @echo ENV HOST_PORT $(PORT) >> ${FILE} - @echo 'RUN apt-get install -y wget' >> ${FILE} $(call add,config,/build/config) $(call add,init,/opt/init) @echo 'RUN chmod +x /opt/init' >> ${FILE} $(call script,prepare) -service: - @if test "${DEPENDS}" != ""; then \ - echo start on started docker-$(subst $(eval) $(eval), and started docker-,$(DEPENDS)) >> init.conf ;\ - echo stop on stopped docker-$(subst $(eval) $(eval), or stopped docker-,$(DEPENDS)) >> init.conf ;\ - else \ - echo start on started docker >> init.conf ;\ - echo stop on stopped docker >> init.conf ;\ - fi - @echo exec /opt/docker/bin/run $(NAME) >> init.conf - @echo respawn >> init.conf - @mv init.conf /etc/init/docker-$(NAME).conf - -bin: - @rm -r bin - @mkdir -p bin - @ln -sf $(BASE)/bin/run bin - @ln -sf $(BASE)/bin/ssh bin - @ln -sf $(BASE)/bin/app bin - @sed -i "1iARGS=\"$(RUN)\"" bin/run - @sed -i "1iARGS=\"$(SSH)\"" bin/ssh - clean: @rm -f ${FILE} @rm -rf build @rm -rf id_rsa -tag_latest: - @docker tag $(NAME):$(VERSION) $(NAME):latest - ssh: @ID=$$(docker ps | grep "$(NAME):$(VERSION)" | awk '{ print $$1 }') && \ if test "$$ID" = ""; then echo "Container is not running."; exit 1; fi && \