0

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.

Destoa
  • 1
  • What does the `cloud-init` log show? There is probably an error occurring when it runs the user-data script, and the only way to know what that error is is to look at the logs. – Mark B Feb 02 '23 at 13:30

0 Answers0