This repository has been archived on 2021-09-05. You can view files and clone it, but cannot push or open issues/pull-requests.
rserve-sandbox-bin/Makefile

30 lines
667 B
Makefile

#!/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"
load:
docker load < $(SAVED_IMAGE)
remove:
docker rmi -f rserve
run:
docker run --net=none --rm $(MOUNT) rserve
stop:
docker stop $$(docker ps --format "{{.ID}}\t{{.Image}}" | grep rserve | awk '{print $$1}') 1>/dev/null 2>/dev/null