Skip to content

Instantly share code, notes, and snippets.

@duckworth
Forked from jakenotjacob/gist:c6b2b3648bab2f575eeadb8dfea11214
Last active June 9, 2024 21:37
Show Gist options
  • Save duckworth/a269a42021e1a0fecc2a73b072be5f15 to your computer and use it in GitHub Desktop.
Save duckworth/a269a42021e1a0fecc2a73b072be5f15 to your computer and use it in GitHub Desktop.
racadm on OSX
##Dockerfile
FROM centos:7
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"
@duckworth
Copy link
Author

alaa-ledger Yeah, those weren't meant to be part of the Dockerfile, just instructions on how to build it. I have commented them out and added an updated build command for Apple Silicon

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