This is CentOS 6.6 server with GUI. I have place my startup commands in /etc/rc.local The service running on this server are Docker and Nginx. So I have put Container start up command with port mapping in rc.local.
The Docker Containers are starting but on Server I am not getting GUI, only CLI is coming, if I comment all the commands in rc.local then GUI is coming after reboot.
The rc.local file contains...
#!/bin/sh # # This script will be executed *after* all the other init scripts. # You can put your own initialization stuff in here if you don't # want to do the full Sys V style init stuff. touch /var/lock/subsys/local sysctl net.ipv4.conf.all.forwarding=1 sleep 5 setenforce Permissive sleep 5 iptables -F sleep 5 service nginx stop sleep 5 service nginx start sleep 5 service docker stop sleep 5 service docker start sleep 5 docker stop $(docker ps -a -q) sleep 5 docker rm $(docker ps -a -q) sleep 5 docker run -p port:port/tcp -d memcached:latest sleep 5 docker run -d -v /mnt/path:/mnt/path -p port:port/tcp imagename sleep 5 docker run -d -p port:port/tcp -p port:port/udp imagename sleep 5 mount -t nfs 192.168.0.3:/mnt/path/ /mnt/path/
chkconfig nginx on.