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"
@b4ldr
Copy link

b4ldr commented May 3, 2024

FYI i needed to use --privileged to get this working

@alaa-ledger
Copy link

does this work for M1 chips? keeps failing for me

@duckworth
Copy link
Author

on Apple Silicon (aarch64) try running

docker build --platform=linux/amd64 --tag racadm:latest .

alias racadm="docker run --rm -it --platform=linux/amd64 racadm:latest racadm"

@alaa-ledger
Copy link

thanks @duckworth

I ended up using the refactored one here

I'm not sure if it was the case but I had --platform=linux/amd64 inside of my Dockerfile, which seemed to not properly take effect. had to run it from both the build & run commands.

@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