https://docs.docker.com and --help are your friend

  • 3 container app
    • nginx, mysql, httpd
    • run all with --detach and --name
  • nginx on 80:80
  • httpd on 8080:80
  • mysql on 3306:3306
  • when running mysql use --env to pass var
    • MYSQL_RANDOM_ROOT_PASSWORD=yes
docker container run -d -p 80:80 --name nginx <nginx_image>:latest
docker container run -d -p 8080:80 --name httpd <httpd_image>:latest
docker container run -d -p 3306:3306 --name mysql --env MYSQL_RANDOM_ROOT_PASSWORD=yes <mysql_image>:latest