4 changed files with 108 additions and 0 deletions
@ -0,0 +1,23 @@
|
||||
Copyright (c) 2017 Franco Masotti. |
||||
All rights reserved. |
||||
|
||||
Redistribution and use in source and binary forms, with or without |
||||
modification, are permitted provided that the following conditions are met: |
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this |
||||
list of conditions and the following disclaimer. |
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, |
||||
this list of conditions and the following disclaimer in the documentation |
||||
and/or other materials provided with the distribution. |
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
@ -0,0 +1,36 @@
|
||||
#!/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 " run Run the image one time"
|
||||
@echo " install Run the image with --restart=unless-stopped"
|
||||
@echo " shell Run an interactive shell in the image"
|
||||
|
||||
load: |
||||
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
|
||||
|
||||
user: $(UHOME) |
||||
|
||||
deluser: |
||||
sudo userdel $(USER)
|
||||
sudo rm -rf $(UHOME)
|
||||
|
@ -0,0 +1,49 @@
|
||||
# rserve-sandbox-bin |
||||
|
||||
A precompiled version of `rserve-sandbox`. |
||||
|
||||
## NOTE |
||||
|
||||
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) |
||||
hooks are needed before you can actually run this. |
||||
|
||||
## What is this about |
||||
|
||||
This is an alternative method to install |
||||
[rserve-sandbox](https://github.com/frnmst/rserve-sandbox) |
||||
|
||||
The advantage of using this method is that no building or dependency |
||||
downloading is required, meaning that there is supposedly no risk of failure |
||||
during the setup phase. The download time is however much longer. |
||||
|
||||
This image was obtained with |
||||
|
||||
$ sudo -u rsd docker save rserve > rserve.tar |
||||
|
||||
using the [AUR package](https://aur.archlinux.org/packages/rserve-sandbox-docker) |
||||
of `rserve-sandbox`. |
||||
|
||||
## Installation |
||||
|
||||
You need to install and enable the Docker service. |
||||
|
||||
### Makefile targets |
||||
|
||||
- `load` |
||||
- Loads the Docker image `rserve` available in this repository. |
||||
|
||||
- `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 |
||||
|
||||
## License |
||||
|
||||
Copyright (c) 2017, Franco Masotti. |
||||
2-Clause BSD (aka FreeBSD). |
Binary file not shown.
Reference in new issue