-
Notifications
You must be signed in to change notification settings - Fork 379
docker build with interactive GUI
mviereck edited this page Nov 27, 2019
·
9 revisions
Some applications need some interaction during installation.
Often it is possible to avoid this with command line options.
In cases where this is not possible, x11docker allows to run an interactive GUI during docker build
.
Example:
- Dockerfile needs line
ARG DISPLAY
:
FROM x11docker/fvwm
ARG DISPLAY
RUN xterm
- Run an X server and note the shown
DISPLAY
variable. Here it isDISPLAY=172.17.0.1:30
:
$ x11docker --xephyr --xoverip --no-auth --display=30 --xhost +
DISPLAY=172.17.0.1:30 XDG_RUNTIME_DIR=/run/user/1000
- Build the docker image and provide
DISPLAY
:
docker build --build-arg DISPLAY=172.17.0.1:30 [...]
- Run your desired commands in the
xterm
window visible in X server Xephyr.