Skip to content

Instantly share code, notes, and snippets.

@derekjkeller
Forked from omaciel/instructions.md
Created November 12, 2020 07:14
Show Gist options
  • Save derekjkeller/23a003615ca3d4cb894e4e44452632ba to your computer and use it in GitHub Desktop.
Save derekjkeller/23a003615ca3d4cb894e4e44452632ba to your computer and use it in GitHub Desktop.
Configuring Docker as Compute Resource for Satellite 6
  • Enable the "Extras" Red Hat channel so you can install Docker ...
#subscription-manager repos --enable rhel-7-server-extras-rpms
  • ... and install it
# yum install -y docker
  • Make sure to enable the docker service...
# systemctl enable docker
  • ... and that it can be run as the apache user (this may be dropped as the code matures)
# usermod -aG docker apache
  • Deal with SElinux (this may be dropped as the code matures)
# echo "OPTIONS=--selinux-enabled -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock" >> /etc/sysconfig/docker
  • Finally, start the docker service
# systemctl start docker
  • Test that Docker is working (you should see a similar output as shown below):
# docker ps
CONTAINER ID    IMAGE    COMMAND    CREATED    STATUS    PORTS    NAMES
  • Obtain a valid Docker image (use busybox for a fairly small and fast download; I chose to use fedora/ssh for this)
# docker pull fedora/ssh
  • Create a new "Docker" Compute Resource and use "http://localhost:2375" for its URL
    • The Test Connection button shows a spinner icon but no confirmation message is displayed to tell you whether things look ok or now

New Compute Resource

  • To create a new container, click the Containers and New container menus, and select the Docker compute resource you created before

Step1

  • Type fedora/ssh (case matters) in the search field and latest in the Tag field
    • NOTE: for some reason, it wasn't until I manually started a container manually with docker run --name myfedora -t fedora/ssh:latest that this part of the process verified that fedora/ssh was a valid entry by showing a green check mark.

Step2

  • Type a name for your container...

Step3

  • Click the TTY checkbox...

Step4

  • ...and your new container is ready to be started

New Container

  • ...and running

Running

  • You can see your container by going to the All containers submenu under the Containers menu.

All containers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment