-
Notifications
You must be signed in to change notification settings - Fork 204
/
INSTALL.docker
62 lines (41 loc) · 1.82 KB
/
INSTALL.docker
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
This is a short overview of how to build and run XCA using docker.
Install docker
==============
To install docker, follow the instructions provided at
https://docs.docker.com/install/
Build XCA container
===================
Use the following command to build XCA container:
docker build --rm --tag xca .
This will build a container named "xca" using default configuration.
Build options
-------------
There are some options to customize build. Use dockers "--build-arg"
option to add options.
CODENAME : code name of ubuntu version
example: --build-arg CODENAME=jammy
PARALLELMFLAGS : make flags for parralel build
example: --build-arg PARALLELMFLAGS=-j2
Run XCA
=======
Once the container is built, run it using the following command:
docker run --rm -it -e USER_ID=`id -u` --network=host \
-e DISPLAY=$DISPLAY -e "QT_X11_NO_MITSHM=1" \
xca
Share local directory
---------------------
Use docker volumes to share a local directory. This might be useful to store data base files.
mkdir -p ./some_local_directory
docker run --rm -it -e USER_ID=`id -u` --network=host \
-e DISPLAY=$DISPLAY -e "QT_X11_NO_MITSHM=1" \
-v ./some_local_directory:/backup \
xca
This makes ./some_local_directory accessible in the container as /backup.
Run over X-Forwarding with SSH
------------------------------
To run with X-Forwarding over an SSH connection, you can mount .Xauthority. If the application windows doesn't show up, likely you also want to switch to OpenGL done in software:
docker run --rm -it --network=host \
-e DISPLAY=$DISPLAY -e "QT_X11_NO_MITSHM=1" -e LIBGL_ALWAYS_SOFTWARE=1 \
-v $HOME/.Xauthority:/home/user/.Xauthority \
xca
Note: the environment variable USER_ID doesn't need to be set, since USER_ID is derived from ownership of .Xauthority file.