Rserve provides a sandboxed R image for use with SWISH
10K+
This directory builds a docker image that safely executes Rserve. Rserve
connections use a Unix domain socket, such that that container can be
started with the --net=none to deny it any access to a network. The
socket is created in the volume /rserve and names socket. There are
two ways to make the socket available:
--name=rserve. This makes the socket available from
embedded volume. Other docket container can use --with-volumes-from rserve to get access to the Rserve socket.```
docker run --net=none --name=rserve rserve
```
2. Create a directory that is owned by a non-priviledged user/group and has its permissions set to provide access to the selected users. For example:
```
useradd -U --create-home --home=/home/rserve rserve
chmod 770 /home/rserve
```
Now, the image can be started using the command below, creating
/home/rserve/socket. Note that the R server runs with the
UID/GID of the mounted directory.
```
docker run --net=none -v /home/rserve:/rserve rserve
```
To protect the container, we
--net=none to disable networking inside
the containerRserve as a non-priveleged userchmod 0, except for those
needed to run R.make image
make run
/home/rserve/socket that allows for contacting
the R server.The entry point Rserve.sh accepts options to limit resources.
Use the command below for details
docker run rserve --help
Please edit Dockerfile to add additional R packages.
Content type
Image
Digest
sha256:335a35d9c…
Size
963.8 MB
Last updated
over 3 years ago
docker pull swipl/rserve