Setting up a Rocky 9 Docker Container

With Centos 7 being desupported soon, here are the steps to setup a Rocky-9 container under Docker.

This is done on an 2011 Intel MacBook Pro 17 inch running OpenCore Patcher and MacOS 14.3.1

  1. Install Docker Desktop. For Macs you can get this at: https://docs.docker.com/desktop/install/mac-install/
  2. Run thru the installer
  3. Open a terminal window as some user (this can be done as a non-root user)
  4. docker image pull rockylinux:9.3.20231119 # download image
  5. docker run -d -it -p 1521:1521 -p 22:22 -p 443:443 -p 80:80 --name rocky-container rockylinux:9.3.20231119 # start container each port you want to expose externally needs to be specified here
  6. docker exec -it rocky-container /bin/bash # to enter the container this will start a shell as root under the container