Then after I install, the error happens when I try to
systemctl start rstudio-server
It saids: “Failed to get D-Bus connection: Operation not permitted”
And I noticed the rstudio-server is not installed in the /usr/lib/systemd/system/ folder as mentioned
it was installed in /etc/init.d/
Any thoughts about solving this?
My guess is this image didn’t use systemd, so I can’t install and manage the service by systemd, but I don’t know how to use some other way to do this. Or just use a centOS8 image.
I hope to run rstudio-server in the docker, but it needn’t in this specific image, and needn’t managed by systemd for the service.
Can you explain why you want to pull a rstudio Docker image and then install a rstudio rpm? Shouldn’t that already be included in the image? Or am I misunderstanding something?
If you want a fixed version, have you checked if the according Docker image exists?
@bluepuma77 has a good point, although rstudio/r-base is not an rstudio image but a base image containing R packages. The image description also mentions it is experimental. In addition to that, you are using a development version. And you even try to use it as a virtual machine. It isn’t. You can use systemd, that’s not how processes in containers work.
Yes I could do that, using rocker/rstudio image is kind a way work around and I did try this which solved this problem. But I still try to understand which reason fails me from installing rstudio in the original r-base image, I thought it should be smooth. I did this to figure out unknown knowledge, not for use only.
Maybe it is not about installing, but starting. You can’t start a process in a Docker container using systemctl. Systemd is not part of containers, or just very rarely is. If the rhel package installs one that runs with systemd only for some reason, that won’t work, but systemd just starts processes and manages them, so you should be able to start it directly.