I am having an issue with docker-compose..I am a newbiew with docker.
I can build my R server with success. Here is the Dockerfile:
FROM ubuntu:16.04
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
RUN echo "deb http://cran.r-project.org/bin/linux/ubuntu trusty/" | tee -a /etc/apt/sources.list
RUN apt-get update
RUN apt-get install -y build-essential
RUN apt-get install -y curl libcurl4-openssl-dev
RUN apt-get install -y apt-utils
RUN apt-get install -y r-base
RUN apt-get install -y r-base-dev
RUN apt-get install -y libssl-dev
ENTRYPOINT ["/usr/bin/R"]
Here is my docker compose file which has a python worker server that needs to call R:
version: '3'
services:
worker:
build: .
image: mtm/mtm-worker-server
r-server:
image: "mtm/mtm-rserver"
Here is the error:
docker-compose up
Recreating compose-mtm-worker_r-server_1 ... done
Starting compose-mtm-worker_worker_1 ... done
Attaching to compose-mtm-worker_r-server_1, compose-mtm-worker_worker_1
r-server_1 | Fatal error: you must specify '--save', '--no-save' or '--vanilla'
compose-mtm-worker_r-server_1 exited with code 2
I have no idea why I am getting this error:
Fatal error: you must specify '--save', '--no-save' or '--vanilla'
PS
I added this to my dockerfile and I got the below:
ENTRYPOINT ["sh", "-c"]
Why did that make a difference?
Recreating compose-mtm-worker_r-server_1 ... done
Starting compose-mtm-worker_worker_1 ... done
Attaching to compose-mtm-worker_worker_1, compose-mtm-worker_r-server_1
r-server_1 | sh: 0: -c requires an argument
compose-mtm-worker_r-server_1 exited with code 2