I have installed docker and httpd on an instance and when I run
sudo docker run -d -p 8600:8080 pengbai/docker-supermario
in SSH, The command works but when I Restart the Instance with this user data(docker and httpd already installed)
#!/bin/bash
sudo yum update -y
sudo systemctl enable httpd
sudo systemctl start httpd
sudo systemctl enable docker
sudo systemctl start docker
sudo docker run -d -p 8600:8080 pengbai/docker-supermario
It does not work
I have tried it with sudo, without sudo and even added a sleep command between some of the commands but still couldn't get it to work.