Running LightBurn 1.7.03 in an Ubuntu docker container

This is a follow-up of my previous (Mar/Apr 23) post.

I then proposed 2 ways of running Lightburn 1.4 under Ubuntu 18:

    1. Use of LD_PRELOAD of more modern (Ubuntu 20) libc and libm
    1. Use of an Ubuntu 22 based docker image to run Lightburn

I moved recently to Lightburn 1.7.03 - I intend to continue to use Linux - and discovered that the 1st method no longer works as too many libraries depend on very recent gcc tags.
I observed that it doesn’t run also on a native Ubuntu 20 for that same reason.
Fortunately, Ubuntu 22 is new enough to run Lightburn 1.7, so the docker methods works flawlessly.

As Linux Lightburn is not now supposed to evolve significantly, I think worthwhile to remind users (like me) that will want to stick a long while to the (last) Linux version of the way to make that functional docker image.

As I’m not sure how to clearly reference the said post, I provide again the way to build the docker image. Sorry if it is technically redundant…


Side Info:

All the license info is hidden in the ~/.config/Lightburn/prefs.ini

A problem with the use of docker is not being able to resolve ‘~’ from the inside of the container.

I solve if by forcing my id (jbarbier::1000) into /etc/passwd and /etc/group during the container construction - not particularly clean but effective.

Now the Docker Image:

(ubuntu is ubuntu last tag, version 24 at this time)

A) Build a container with a dockerfile:
FROM ubuntu
RUN apt update
RUN apt install -y libusb-1.0-0
RUN apt install -y libpulse-dev
RUN apt install -y libgl1
RUN apt install -y build-essential libgl1-mesa-dev
RUN apt install -y libxkbcommon-x11-0
RUN apt install -y libxcb-image0
RUN apt install -y libxcb-keysyms1
RUN apt install -y libxcb-render-util0
RUN apt install -y libxcb-xinerama0
RUN apt install -y libxcb-icccm4
RUN apt install -y libxi6
RUN apt install -y libxinerama1
RUN apt install -y libxrender1
RUN apt install -y net-tools
RUN apt install -y iputils-ping

RUN echo “jbarbier:x:1000:1000:Jean Barbier,:/home/jbarbier:/bin/bash” > /etc/passwd
RUN echo “jbarbier:x:1000:” > /etc/group

ENV DISPLAY=:0

and launch the build with:

docker build -t ubuntu_lbr -f ubuntu_docker.file .

B) launch LightBurn with a shell script:

docker container run -u 1000:1000 -v /home:/home -v /tmp:/tmp -h Light --mac-address 02:42:ac:11:00:02 -it ubuntu_lbr /home/labtools/LightBurn.1.3.01/LightBurn

Notes:

–mac-address may be an overkill
-h Light is just a commodity to name the container
-v /tmp:/tmp allows the access to the X11 socket on the host
Don’t forget to run ‘xhost +’ on the host to allow the access to the X11 server from the container (!)

Did you consider using the AppImage instead of installing it?
I use Linux Mint, which is based on Ubuntu, and it works better than the installed version. In my case, it’s the only way to use the camera without errors.