Sample Header Ad - 728x90

glxinfo gives odd error on ubuntu noble container

0 votes
0 answers
35 views
I'm trying to create a ubuntu noble container (it has to be ubuntu noble due to another software's compatibility constraints) with a gui capable of running Gazebo, a robot simulation. For Gazebo, I need a working OpenGL setup (using mesa). As of now, though, my attempts to verify my setup with glxinfo fail due to some odd error:
root@554bf70792e2:/# glxinfo
name of display: :1
Error: couldn't find RGB GLX visual or fbconfig
I've done a ton of searching online and tried many solutions but none of them seemed to work. Can anyone help me out? # Further context: I'm running this on an apple silicon macbook (M3). Dockerfile:
FROM --platform=linux/arm64 ubuntu:noble

# ---------- Set Up VNC Server ----------

# Install Necessary Debian Packages
ENV DEBIAN_FRONTEND=noninteractivex
RUN apt update && \
    apt upgrade -y && \
    apt install -y xfce4 xfce4-goodies tightvncserver dbus-x11

# Add vncuser
RUN useradd -m vncuser && echo "vncuser:password" | chpasswd

# Switch to vncuser
USER vncuser

# Set up VNC password

RUN mkdir -p ~/.vnc && \
    echo "password" | vncpasswd -f > ~/.vnc/passwd && \
    chmod 600 ~/.vnc/passwd

# Set the default desktop environment to XFCE
RUN echo "#!/bin/bash\nXvfb :1 -screen 0 1280x720x24 &\nstartxfce4 &" > ~/.vnc/xstartup && \
    chmod +x ~/.vnc/xstartup && \
    touch ~/.Xauthority

# Switch back to root
USER root

# Expose VNC port
EXPOSE 5901

# Set environment variables
ENV DISPLAY=:1 \
    XDG_RUNTIME_DIR=/tmp/runtime-root \
    LIBGL_ALWAYS_SOFTWARE=1

# Mesa and other libraries
RUN apt update && apt install -y \
    libgl1-mesa-dri \
    libglx-mesa0 \
    libegl-mesa0 \
    mesa-vulkan-drivers \
    libosmesa6 \
    mesa-utils \
    xvfb \
    pciutils
vnc-start.sh:
su - vncuser -c "
export USER=vncuser
export DISPLAY=:1
vncserver -geometry 1280x720 -depth 24 :1
xhost +"
docker-compose.yml:
services:
  gprp:
    build: .
    container_name: gprp
    command: tail -f /dev/null
    ports:
      - "5901:5901"
    volumes:
      - .:/workspace
To start the container, I run docker-compose build and docker-compose up -d, then (within the container) run vnc-start.sh and glxinfo.
Asked by Kenneth Wilber (1 rep)
Dec 27, 2024, 01:13 AM
Last activity: Dec 27, 2024, 01:29 AM