Skip to content

BUG: cannot run rstudio server in podman container #2887

@h-vetinari

Description

@h-vetinari

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:
podman_studio0

And arrives at the actual R session:
podman_studio1

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.

podman_studio2

Metadata

Metadata

Labels

locked - please file new issue/PRAssist humans wanting to comment on an old issue or PR with locked comments.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions