{"action":"created","issue":{"url":"https://api.github.com/repos/radiasoft/radtrack/issues/132","labels_url":"https://api.github.com/repos/radiasoft/radtrack/issues/132/labels{/name}","comments_url":"https://api.github.com/repos/radiasoft/radtrack/issues/132/comments","events_url":"https://api.github.com/repos/radiasoft/radtrack/issues/132/events","html_url":"https://github.com/radiasoft/radtrack/issues/132","id":116902623,"number":132,"title":"RadTrack Docker installer does not work in Linux","user":{"login":"MZHarrison","id":10423990,"avatar_url":"https://avatars.githubusercontent.com/u/10423990?v=3","gravatar_id":"","url":"https://api.github.com/users/MZHarrison","html_url":"https://github.com/MZHarrison","followers_url":"https://api.github.com/users/MZHarrison/followers","following_url":"https://api.github.com/users/MZHarrison/following{/other_user}","gists_url":"https://api.github.com/users/MZHarrison/gists{/gist_id}","starred_url":"https://api.github.com/users/MZHarrison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MZHarrison/subscriptions","organizations_url":"https://api.github.com/users/MZHarrison/orgs","repos_url":"https://api.github.com/users/MZHarrison/repos","events_url":"https://api.github.com/users/MZHarrison/events{/privacy}","received_events_url":"https://api.github.com/users/MZHarrison/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-11-14T06:25:45Z","updated_at":"2015-11-20T02:23:02Z","closed_at":null,"body":"I attempted to follow the Linux instructions from https://github.com/radiasoft/download. After installing Virtualbox and Docker, the installer:\r\n```\r\nmkdir radtrack\r\ncd radtrack\r\ncurl radiasoft.download | bash\r\n```\r\ncomplained about the Docker daemon not running. After unsuccessfully trying to run the Docker daemon, I removed Docker and installed Vagrant.  Rerunning the above commands resulted in (copied from the install.log):\r\n```\r\n11/14/2015 05:28:30 install_main\r\n11/14/2015 05:28:30 curl -L -s -S https://raw.githubusercontent.com/radiasoft/download/master/bin/vagrant.sh\r\n11/14/2015 05:28:31 curl -L -s -S https://raw.githubusercontent.com/biviosoftware/home-env/master/bin/bivio_vagrant_ssh\r\n11/14/2015 05:28:31 Creating Vagrantfile\r\n11/14/2015 05:28:31 vagrant box add radiasoft/radtrack\r\n==> box: Loading metadata for box 'radiasoft/radtrack'\r\n    box: URL: https://atlas.hashicorp.com/radiasoft/radtrack\r\n==> box: Adding box 'radiasoft/radtrack' (v20151106.024557) for provider: virtualbox\r\n    box: Downloading: https://atlas.hashicorp.com/radiasoft/boxes/radtrack/versions/20151106.024557/providers/virtualbox.box\r\nThe box failed to unpackage properly. Please verify that the box\r\nfile you're trying to add is not corrupted and try again. The\r\noutput from attempting to unpackage (if any):\r\n\r\nx ./box-disk1.vmdk: Write failed\r\nx ./box.ovf: Write failed\r\nx ./Vagrantfile: Write failed\r\nbsdtar: Error exit delayed from previous errors.\r\n11/14/2015 05:34:49 Error trap\r\n```"},"comment":{"url":"https://api.github.com/repos/radiasoft/radtrack/issues/comments/158260424","html_url":"https://github.com/radiasoft/radtrack/issues/132#issuecomment-158260424","issue_url":"https://api.github.com/repos/radiasoft/radtrack/issues/132","id":158260424,"user":{"login":"robnagler","id":5495179,"avatar_url":"https://avatars.githubusercontent.com/u/5495179?v=3","gravatar_id":"","url":"https://api.github.com/users/robnagler","html_url":"https://github.com/robnagler","followers_url":"https://api.github.com/users/robnagler/followers","following_url":"https://api.github.com/users/robnagler/following{/other_user}","gists_url":"https://api.github.com/users/robnagler/gists{/gist_id}","starred_url":"https://api.github.com/users/robnagler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robnagler/subscriptions","organizations_url":"https://api.github.com/users/robnagler/orgs","repos_url":"https://api.github.com/users/robnagler/repos","events_url":"https://api.github.com/users/robnagler/events{/privacy}","received_events_url":"https://api.github.com/users/robnagler/received_events","type":"User","site_admin":false},"created_at":"2015-11-20T02:23:02Z","updated_at":"2015-11-20T02:23:02Z","body":"There are a couple of issues here. The first one is that Ubuntu host and Fedora guest are not playing nice together when `--net host` is specified to docker, and you run `su`. This is an open in docker/docker#5899. \r\n\r\nOne workaround is recompiling libpam on the guest, which means we will have to maintain our own Fedora package for PAM, which is the security library. This seems fraught.\r\n\r\nAnother work around is that we check the uid/gid of the host user. If it matches 1000/1000 of the guest user, then we don't need to execute /radia-run inside the container. We can invoke `docker run -u vagrant`, which avoids the call to `su`.\r\n\r\nIf the uid/gid does not match, we invoke the image, execute `usermod` as `/radia-run` does to match the host/guest uid/gid, and then export the container with a tag of the user's name, then invoke that modified image.\r\n\r\nAnother alternative is to use a setuid/gid program instead of `su` and the PAM calls that are causing the problem. Need to investigate this further.\r\n\r\nOnce we could execute docker run, we had a new error:\r\n\r\n```text\r\nX Error: BadAccess (attempt to access private resource denied) 10\r\nExtension: 130 (MIT-SHM)\r\nMinor opcode: 1 (X_ShmAttach)\r\n```\r\n\r\nQt is being \"too clever\" here. It figures out that the X server is running on the same machine as its process (the X client), and tries to access shared memory. Docker doesn't allow this, of course, so it gets an access violation. The fix to this is to run the client with this environment variable:\r\n\r\n```bash\r\nexport QT_X11_NO_MITSHM=1\r\n```\r\n"}}