0

So, I need to develop and run a specific gui app on Ubuntu. Application is based on OpenGL and freeglut. I'd like to develop from macbook, so I tried to use the vs code remote container feature. It worked well, until I needed to run this app. I installed a lot of various gl packages inside container, ran it with xquarts and etc.

And now I met the problem with glut: freeglut (my_app): ERROR: Internal error <FBConfig with necessary capabilities not found> in function fgOpenWindow. As I found there, it's a known bug with glut and remote connection. And it's known from 2009! So does anyone know, how to get rid of it? Or I will never run my app inside docker?

My current Dockerfile:

FROM nvidia/cudagl:9.0-devel-ubuntu16.04

# This Dockerfile's base image has a non-root user with sudo access. Use the "remoteUser"
# property in devcontainer.json to use it. On Linux, the container user's GID/UIDs
# will be updated to match your local UID/GID (when using the dockerFile property).
# See https://aka.ms/vscode-remote/containers/non-root-user for details.
ARG USERNAME=user

ENV DEBIAN_FRONTEND noninteractive

# Adding new architecture in package base
RUN dpkg --add-architecture i386

# Installg tools
RUN apt-get update \
    && apt-get -y install sudo software-properties-common zsh wget

# Installing latest git
RUN add-apt-repository ppa:git-core/ppa \
    && apt-get update \
    && apt-get -y install git

# Install C++ tools
RUN apt-get -y install build-essential gcc-multilib g++-multilib cmake cppcheck valgrind

# Install some dependencies
RUN apt-get -y install libc6-dev-i386 libgl1-mesa-dev libglu1-mesa-dev freeglut3 freeglut3-dev libjpeg-turbo8-dev libpng12-dev mesa-utils

# Install dependencies with another architecture
RUN apt-get -y install libgl1-mesa-dev:i386 libglu1-mesa-dev:i386 freeglut3:i386 freeglut3-dev:i386 libpng12-0:i386

# Install nvidia driver
RUN apt-get install -y binutils xserver-xorg-video-all

# Adding new user
RUN groupadd --gid 2000 $USERNAME \
    && useradd --uid 2000 --gid $USERNAME --shell /bin/zsh --create-home $USERNAME \
    && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME

# Clean up
RUN apt-get autoremove -y \
    && apt-get clean -y \
    && rm -rf /var/lib/apt/lists/*

USER $USERNAME

ENV DEBIAN_FRONTEND interactive

1 Answers1

0

I don't know how, but now it's working! I've tried to use so many things, so I don't know what exactly helped me. So I'll try to tell everything:

  1. Docker base image become Ubuntu 14.04. I've already tried it before, but it didn't work then.
  2. I've downgraded XQuartz to version 2.7.8
  3. I've pasted this in terminal: defaults write org.macosforge.xquartz.X11 enable_iglx -bool true

Just in case, here is my new Dockerfile:

FROM ubuntu:14.04

# This Dockerfile's base image has a non-root user with sudo access. Use the "remoteUser"
# property in devcontainer.json to use it. On Linux, the container user's GID/UIDs
# will be updated to match your local UID/GID (when using the dockerFile property).
# See https://aka.ms/vscode-remote/containers/non-root-user for details.
ARG USERNAME=user

ENV DEBIAN_FRONTEND noninteractive

# Adding new architecture in package base
RUN dpkg --add-architecture i386

# Install tools
RUN apt-get update \
    && apt-get -y install sudo software-properties-common zsh wget

# Install last git
RUN add-apt-repository ppa:git-core/ppa \
    && apt-get update \
    && apt-get -y install git

# Install C++ tools
RUN apt-get -y install build-essential gcc-multilib g++-multilib cmake cppcheck valgrind

# Install some dependencies
RUN apt-get -y install libc6-dev-i386 libgl1-mesa-dev libglu1-mesa-dev freeglut3 freeglut3-dev libjpeg-turbo8-dev libpng12-dev mesa-utils

# Install dependencies with another architecture
RUN apt-get -y install libgl1-mesa-dev:i386 libglu1-mesa-dev:i386 freeglut3:i386 freeglut3-dev:i386 libpng12-0:i386

# Install nvidia driver
RUN apt-get install -y binutils xserver-xorg-video-all

# Adding new user
RUN groupadd --gid 2000 $USERNAME \
    && useradd --uid 2000 --gid $USERNAME --shell /bin/zsh --create-home $USERNAME \
    && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME

# Clean up
RUN apt-get autoremove -y \
    && apt-get clean -y \
    && rm -rf /var/lib/apt/lists/*

USER $USERNAME

ENV DEBIAN_FRONTEND interactive