Rstudio server in docker doesn't listen for control+C command

Viewed 57

I'm having a very annoying issue with rstudio server casted from a docker container. Here is the dockerfile

COPY rstudioServer /rstudioServer
RUN cd /rstudioServer/ && 7za -y x "*.7z*"
RUN apt-get install -y psmisc libapparmor1 sudo libclang-dev libpq5
RUN dpkg -i /rstudioServer/rstudio-server-2021.09.1-372-amd64.deb

RUN echo "PATH=${PATH}" >> /usr/local/lib/R/etc/Renviron \
  && useradd rstudio \
  && echo "rstudio:rstudio" | chpasswd \
    && mkdir /home/rstudio \
    && chown rstudio:rstudio /home/rstudio \
    && addgroup rstudio staff \
  &&  echo 'rsession-which-r=/usr/local/bin/R' >> /etc/rstudio/rserver.conf \
  && echo 'lock-type=advisory' >> /etc/rstudio/file-locks \


EXPOSE 8888

ENV USER=rstudio
COPY rserver.conf /etc/rstudio/rserver.conf
RUN rstudio-server verify-installation
COPY cc.R /cc.R
RUN Rscript /cc.R
CMD ["/usr/lib/rstudio-server/bin/rserver", "--server-daemonize", "0", "--auth-none", "1"]

where :

  • rstudioServer is a folder containing rstudio-server-2021.09.1-372-amd64.deb in 7z -rserver.conf is

    rsession-which-r=/usr/local/bin/R

    www-port=8888

cc.R is

options(encoding = "UTF-8")

The way i run the docker is :

docker run -itv $tt:/home/rstudio/ -v /var/run/docker.sock:/var/run/docker.sock --cidfile  $tt/id.txt --privileged=true -p 8888:8888   -e DISABLE_AUTH=true rstudio

If in the terminal then, i type anything, Control+C, Control+Z , it just dont listen and nothing happen. If i close the terminal window the docker will keep running. The only way to stop it is by killing the docker. Does someone have any idea?

Thanks

0 Answers
Related