Browse Source

Added distro package files.

distro-package
Franco Masotti 5 years ago
parent
commit
a997cdaf01
  1. 33
      Makefile
  2. 13
      README.md

33
Makefile

@ -9,28 +9,21 @@ UHOME=/home/$(USER)
MOUNT=-v /home/$(USER):/home/rserve
all::
@echo "Targets:"
@echo
@echo " load Loads the precompiled image"
@echo " run Run the image one time"
@echo " install Run the image with --restart=unless-stopped"
@echo " shell Run an interactive shell in the image"
@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)
docker load < $(SAVED_IMAGE)
run:
docker run --net=none --detach $(MOUNT) rserve
install:
docker run --net=none --detach --restart=unless-stopped $(MOUNT) rserve
shell:
docker run -it $(MOUNT) rserve /bin/bash
remove:
docker rmi -f rserve
user: $(UHOME)
deluser:
sudo userdel $(USER)
sudo rm -rf $(UHOME)
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

13
README.md

@ -4,7 +4,9 @@ A precompiled version of `rserve-sandbox`.
## NOTE
Post
The Makefile in this branch is not intendended to be run manually.
Post
[installation](https://frnmst.github.io/swish-installer/swish-installer.html#Install-actions)
and
[remove](https://frnmst.github.io/swish-installer/swish-installer.html#Remove-actions)
@ -35,15 +37,20 @@ You need to install and enable the Docker service.
- `load`
- Loads the Docker image `rserve` available in this repository.
- `remove`
- Removes the current image.
- `run`
- Starts the Rserve container. This creates a Unix domain
socket `/home/rserve/socket` that allows contacting
the R server.
- `shell`
- Starts the container with a shell, so you can look around
- `stop`
- Stops and removes the current container.
## License
Copyright (c) 2017, Franco Masotti.
2-Clause BSD (aka FreeBSD).