docker (393B)
1 override TAG = $(shell basename $$PWD) 2 VER := latest 3 IMAGE_ID = $(shell eval sudo docker images -qa ${TAG} | head -n 1) 4 5 .PHONY build test buildtest deploy 6 7 build: 8 sudo docker build -t ${TAG}:${VER} . 9 10 test: 11 sudo docker run -d ${TAG}:${VER} 12 13 buildtest: build test 14 15 deploy: 16 @echo ${IMAGE_ID} 17 sudo docker tag ${IMAGE_ID} pyratebeard/${TAG}:${VER} 18 sudo docker push pyratebeard/${TAG}:${VER}