podman: BUG: cannot run rstudio server in podman container
When I first tried podman, the following was the core issue that forced me to abandon podman again (resp. at least try with the most current version; which lead to #2250). All the other little issues (cf. e.g containers/buildah#1456 or the others referenced in #2250) could be worked around with some effort, but I didn’t find a solution to the following.
Say we have the following dockerfile, and call it podman_studio.dockrf:
FROM docker.io/library/ubuntu:bionic
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
r-base \
# dependencies for rstudio-server
libapparmor1 \
libclang-dev \
libedit2 \
lsb-release \
psmisc \
sudo \
# see https://www.rstudio.com/products/rstudio/download/preview/
&& curl https://s3.amazonaws.com/rstudio-ide-build/server/bionic/amd64/rstudio-server-1.2.1335-amd64.deb > rstudio.deb \
&& dpkg -i rstudio.deb \
&& rm rstudio.deb \
&& rm -rf /var/lib/apt/lists/*
# add a testuser user to be able to start rstudio server
ARG TEST_USER=test_user
RUN useradd -m $TEST_USER
RUN echo "$TEST_USER:password123" | chpasswd
RUN chown $TEST_USER:$TEST_USER /home/$TEST_USER/
CMD ["bash"]
This installs the current preview of RStudio Server into a container, and adds a test user. Building and running this with docker, one can start the server from inside the container:
$ sudo docker build -t docker_studio -f podman_studio.dockrf .
$ sudo docker run --rm -it -p 8082:8787 docker_studio
root@dabf5ce514f2:/# rstudio-server start
One may then enter the logins we specified above:

And arrives at the actual R session:

Doing the same with podman (version 1.3.0-dev from the latest nightly), i.e.
$ sudo podman build -t podman_studio -f podman_studio.dockrf .
$ sudo podman run --rm -it -p 8082:8787 localhost/podman_studio
root@f652fa0e4e78:/# rstudio-server start
it’s clear that something is there on localhost:8082; it forwards to /auth-sign-in, but never actually manages to load the page correctly.

About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 40 (19 by maintainers)
This is working for me in podman.
rpm -q podman podman-1.2.0-2.git3bd528e.fc30.x86_64
podman run --rm -it -p 8082:8787 localhost/podman_test
root@5244c2c286fa:/# rstudio-server start root@5244c2c286fa:/#