FROM debian:bullseye-slim
RUN apt-get update && apt-get install --no-install-recommends -y build-essential libtcmalloc-minimal4 flex indent ksh libfltk1.3-dev libfltk-images1.3
COPY . /usr/src/bacon
WORKDIR /usr/src/bacon
RUN LDFLAGS=-l:libtcmalloc_minimal.so.4 ./configure
RUN make
RUN make install
WORKDIR /tmp
docker build -t bacon-fltk .
docker run bacon-fltk:latest bacon -v
xhost +local:
you should get this output in your terminal
non-network local connections being added to access control list
export X2DOCKER=" -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix$DISPLAY bacon-fltk"
docker run $X2DOCKER bacongui-fltk
now you can pass x to any app to test
docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
bacon-fltk latest 7631e27361ad 12 hours ago 374MB