Red Hat Enterprise Linux (often abbreviated to RHEL) is a Linux distribution developed by Red Hat for the commercial market. Red Hat Enterprise Linux is released in server versions for x86-64, Power ISA, ARM64, and IBM Z and a desktop version for x86-64. All of Red Hat's official support and training, together with the Red Hat Certification Program, focuses on the Red Hat Enterprise Linux platform.
Learn more about RHEL: https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux
This Docker container makes it easy to get an instance of SSHD up and running with RHEL.
Based on Official RHEL Docker Image with some minor hack:
- Packaging by Packer Docker builder and Ansible provisioner in single layer
- Handle
ENTRYPOINT
with catatonit - Handle
CMD
with SSHD
Start SSHD:
# Pull latest image
docker pull alvistack/rhel-8
# Run as detach
docker run \
-itd \
--name rhel \
--publish 2222:22 \
alvistack/rhel-8
Success. SSHD is now available on port 2222
.
Because this container DIDN'T handle the generation of root
password, so you should set it up manually with pwgen
by:
# Generate password with pwgen
PASSWORD=$(docker exec -i centos pwgen -cnyB1); echo $PASSWORD
# Inject the generated password
echo "root:$PASSWORD" | docker exec -i centos chpasswd
Alternatively, you could inject your own SSH public key into container's authorized_keys by:
# Inject your own SSH public key
(docker exec -i centos sh -c "cat >> /root/.ssh/authorized_keys") < ~/.ssh/id_rsa.pub
Now you could SSH to it as normal:
ssh root@localhost -p 2222
Release tags could be find from GitHub Release of this repository. Thus using these tags will ensure you are running the most up to date stable version of this image.
Version tags ended with .0.0
are rolling release rebuild by GitLab
pipeline in
weekly basis. Thus using these tags will ensure you are running the
latest packages provided by the base image project.
- Code released under Apache License 2.0
- Docs released under CC BY 4.0
- Wong Hoi Sing Edison