Skip to content

Instantly share code, notes, and snippets.

@AlperRehaYAZGAN
Created March 27, 2023 06:16
Show Gist options
  • Save AlperRehaYAZGAN/47c879786192c64ceef114b880bd81ac to your computer and use it in GitHub Desktop.
Save AlperRehaYAZGAN/47c879786192c64ceef114b880bd81ac to your computer and use it in GitHub Desktop.
A simple dockerfile that supports systemctl command on rockylinux.
FROM rockylinux:8.7
# update
RUN yum -y update
# install systemd
RUN yum -y install initscripts curl systemd
# minio client
RUN curl -L https://dl.min.io/client/mc/release/linux-amd64/mc -o /usr/local/bin/mc && \
chmod +x /usr/local/bin/mc
# usr/sbin/init for enable systemctl commands
# System has not been booted with systemd as init system (PID 1). Can't operate.
# Failed to connect to bus: Host is down
CMD ["/usr/sbin/init"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment