I have RHEL 7.5 Linux EC2 machine.It has below userdata.
#cloud-config
rumcmd:
- hostname "2CPV-PQ-XX6901"
- echo "2CPV-PQ-XX6901" > /etc/hostname
- authconfig --update --disablesssd --disablesssdauth --disablemkhomedir
- echo "sudo /root/init_bootstrap.sh > /root/init_boot.log 2>&1" | at -m now + 8 minute
- service restart sshd
I want to run below two commands automatically on reboot
sudo HTTPS_PROXY= http://someproxy.xxx.com:8080 dockerd &
sudo chmod 666 /var/run/docker.sock
I have added the above commands in /etc/rc.local but when i reboot it looks like it doesn't run the command as docker is not working.
Please suggest where i can provide these two commands so that docker deamon runs automatically on every reboot.