You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

32 lines
860 B

6 years ago
#!/usr/bin/make -f
# Copyright (c) 2017, Franco Masotti.
# See LICENSE file for details.
SAVED_IMAGE=rserve.tar
USER=rserve
UHOME=/home/$(USER)
MOUNT=-v /home/$(USER):/home/rserve
all::
@echo "Targets:"
@echo
@echo " load Loads the precompiled image"
@echo " remove remove the docker image"
@echo " run run the container one time"
@echo " stop quit and remove the current docker container"
6 years ago
load:
docker load < $(SAVED_IMAGE)
6 years ago
remove:
docker rmi -f rserve
6 years ago
run:
docker run --net=none --rm $(MOUNT) rserve
6 years ago
# The following commented command only works for Docker >= 1.8.0 (2015-08-11)
# docker stop $$(docker ps --format "{{.ID}}\t{{.Image}}" | grep rserve | awk '{print $$1}') 1>/dev/null 2>/dev/null
stop:
docker stop $$(docker ps | awk '{print $$1 "\t" $$2}' | grep rserve | awk '{print $$1}') 1>/dev/null 2>/dev/null