Re: Testing software on CentOS 7

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 03/18/2019 10:57 PM, Gordon Messmer wrote:
> On 3/18/19 6:39 PM, H wrote:
>> Think I got it to work now, I needed to add the RUN export ... at the page you linked to.
>
>
> Running "export" in your Dockerfile won't change the image that gets built.
>
> I tried running geany in a container on Fedora and had to make two adjustments.  First, the Fedora SELinux policy blocks access to /tmp/.X11-unix, and second I had to enable local connections using xhost, so:
>
> $ sudo setenforce permissive
> $ xhost +local:docker
> $ docker run -i -t --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v ~/Documents:/root/Documents centos:7 /bin/bash --login
> [root@45fdbee081d2 /]# yum -y install epel-release > /dev/null 2>&1
> [root@45fdbee081d2 /]# yum -y install geany > /dev/null 2>&1
> [root@45fdbee081d2 /]# geany
> $ sudo setenforce enforcing
>
>
>> I can now get geany to open, have not yet figured out how to be able to access files on the host computer...
>
>
> You'd use docker-run's "-v" flag to bind-mount the directory containing your files in the container, as I mounted my Documents directory above.  Take a look at the "docker-run" man page and check the documentation for each of the flags used in that command, at a minimum.
>
>
> _______________________________________________
> CentOS mailing list
> CentOS@xxxxxxxxxx
> https://lists.centos.org/mailman/listinfo/centos

Got it working, turned out all I had to do was to add another volume that is my home directory on the host computer. This relies on having the same user in both docker and on host computer.

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]


  Powered by Linux