Docker Image
Estimated reading time: 2 minutesThe CEPC software docker image is
available on docker hub.
It includes CVMFS
clients and CEPC configuration.
The Dockerfile
is located on repository
https://github.com/cepc/docker-cvmfs.
Docker must be preinstalled on your system before the next steps.
Create and Start the Container
Run the following command to start the container for the first time:
docker run --privileged -i -t cepc/cvmfs
Then you will see bash prompt from the container. CEPC software is available by:
cepcenv ls
cepcenv use <version>
root -b
Type exit
to quit the container.
The container could be resumed with “docker start
” command
afterwards:
docker start -i <container_name_or_ID>
You can use “docker ps -a
” to list all the containers to get the
name or ID, including stopped ones.
Program with GUI
Use docker as a ssh server
The GUI program could not be executed correctly by default. One way to run them in docker is using the ssh server. The container could be created with extra arguments:
docker run --privileged -p 22222:22 -d cepc/cvmfs /usr/sbin/sshd -D
This command will exit immediately with the container running in the background. It may take a while before the ssh server started. Then try to connect to the container with ssh client:
ssh -X -Y -p 22222 root@localhost
The default password is “root
”.
The container will keep running in the background. It can be connected
with the ssh client at any time. If it is stopped by “docker stop
” or
system reboot, it can be started again by command:
docker start <container_name_or_ID>
Do not add -i
argument here because we don’t want to enter the
interactive mode.
Use X11
(This method does not work on the author’s PC, and he is looking for the solution.) This method is tested on MaxOS. The Linux users are welcome to report whether it is available on Linux system.
docker run --name slc6 -h dev \
-e DISPLAY=$(ipconfig getifaddr en0):0 \
-v /tmp/cvmfs:/var/lib/cvmfs \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v /User/[a folder on your computer]:/root/CEPC \
--privileged -i -t --rm cepc/cvmfs
If you happened to meet problem, try removing the cache file /tmp/cvmfs first
OpenGL Programs for MacOS
If running programs using OpenGL (like Druid), while the X server is XQuartz under MacOS, there could be error while initializing libGL. In order to solve it, the following command should run once on the MacOS (NOT in the docker):
defaults write org.macosforge.xquartz.X11 enable_iglx -bool true
Remember to restart XQuartz after changing the configuration.