Forked from jakenotjacob/gist:c6b2b3648bab2f575eeadb8dfea11214
Last active
June 9, 2024 21:37
-
-
Save duckworth/a269a42021e1a0fecc2a73b072be5f15 to your computer and use it in GitHub Desktop.
racadm on OSX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##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" |
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
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.