Skip to content

Instantly share code, notes, and snippets.

@bennyfactor
Forked from duckworth/Dockerfile
Last active July 26, 2025 22:29
Show Gist options
  • Select an option

  • Save bennyfactor/6babea5b8b0ec9439cb136d72b0cb0f6 to your computer and use it in GitHub Desktop.

Select an option

Save bennyfactor/6babea5b8b0ec9439cb136d72b0cb0f6 to your computer and use it in GitHub Desktop.
racadm on OSX
##Dockerfile
FROM centos:7
RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo
RUN sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo
RUN sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo
RUN yum clean all && yum -y update
RUN yum update -y && yum install -y wget perl openssl-devel dmidecode sed vim
RUN wget -q -O - http://linux.dell.com/repo/hardware/latest/bootstrap.cgi | bash
# Edit /etc/yum.repos.d/dell-system-update.repo to point to last supported centos 7 version
RUN sed -i '/\[dell-system-update_independent\]/a baseurl=https://linux.dell.com/repo/hardware/DSU_22.08.12/os_independent/' /etc/yum.repos.d/dell-system-update.repo
RUN sed -i 's|baseurl=https://linux.dell.com/repo/hardware/dsu/os_independent/|#&|' /etc/yum.repos.d/dell-system-update.repo
RUN sed -i '/\[dell-system-update_dependent\]/a baseurl=https://linux.dell.com/repo/hardware/DSU_22.08.12/os_dependent/RHEL7_64/' /etc/yum.repos.d/dell-system-update.repo
RUN sed -i 's|mirrorlist=https://linux.dell.com/repo/hardware/dsu/mirrors.cgi?osname=el$releasever&basearch=$basearch&native=1|#&|' /etc/yum.repos.d/dell-system-update.repo
RUN yum clean all
#RUN yum install -y srvadmin-all --enablerepo=base
RUN yum install -y srvadmin-idracadm7 --enablerepo=base
RUN cp /opt/dell/srvadmin/bin/idracadm7 /usr/local/bin/racadm
## Build Dockerfile via... (run inside somedir/Dockerfile)
docker build --tag racadm:latest .
##Then add in your bashrc/zshrc whatever
alias racadm="docker run --rm -it racadm:latest racadm"
## Or for Apple Silicon:
docker build --platform=linux/amd64 --tag racadm:latest .
alias racadm="docker run --rm -it --platform=linux/amd64 racadm:latest racadm"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment