-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert retry logic Install glibc in its entirety. Upkeep: -Update go-mod -Update gitrunner release go version
- Loading branch information
1 parent
088799c
commit a55ac4d
Showing
5 changed files
with
111 additions
and
115 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,85 @@ | ||
FROM debian:12.7-slim AS stage1 | ||
FROM alpine:3.8 as stage1 | ||
Check warning on line 1 in Dockerfile GitHub Actions / buildThe 'as' keyword should match the case of the 'from' keyword
|
||
|
||
# Supermicro SUM | ||
# Note: If we remove the SUM tool, we can move back to an alpine image. Then also compile bioscfg with CGO_ENABLED=0 | ||
WORKDIR /tmp/sum | ||
# IPMITOOL | ||
|
||
## Pre-reqs | ||
RUN apt-get update | ||
RUN apt-get install wget -y | ||
|
||
## Download | ||
RUN wget https://www.supermicro.com/Bios/sw_download/698/sum_2.14.0_Linux_x86_64_20240215.tar.gz -O sum.tar.gz | ||
RUN mkdir -p unzipped | ||
RUN tar -xvzf sum.tar.gz -C unzipped --strip-components=1 | ||
ARG IPMITOOL_REPO=https://github.com/ipmitool/ipmitool.git | ||
ARG IPMITOOL_COMMIT=19d78782d795d0cf4ceefe655f616210c9143e62 | ||
|
||
## Install | ||
RUN cp unzipped/sum /usr/bin/sum #TODO; smc sum has the same name as the gnu command sum (/usr/bin/sum). So we are overwritting it. Sorry not Sorry. | ||
RUN chmod +x /usr/bin/sum | ||
WORKDIR /tmp | ||
RUN apk add --update --upgrade --no-cache --virtual build-deps\ | ||
alpine-sdk \ | ||
automake \ | ||
autoconf \ | ||
libtool \ | ||
openssl-dev \ | ||
readline-dev \ | ||
&& git clone -b master ${IPMITOOL_REPO} | ||
|
||
# IPMI Tool | ||
# | ||
# cherry-pick'ed 1edb0e27e44196d1ebe449aba0b9be22d376bcb6 | ||
# to fix https://github.com/ipmitool/ipmitool/issues/377 | ||
# | ||
ARG IPMITOOL_REPO=https://github.com/ipmitool/ipmitool.git | ||
ARG IPMITOOL_COMMIT=19d78782d795d0cf4ceefe655f616210c9143e62 | ||
ARG IPMITOOL_CHERRY_PICK=1edb0e27e44196d1ebe449aba0b9be22d376bcb6 | ||
ARG IPMITOOL_BUILD_DEPENDENCIES="git curl make autoconf automake libtool libreadline-dev" | ||
WORKDIR /tmp/ipmitool | ||
RUN git checkout ${IPMITOOL_COMMIT} \ | ||
&& git config --global user.email "[email protected]" \ | ||
&& git cherry-pick 1edb0e27e44196d1ebe449aba0b9be22d376bcb6 \ | ||
&& ./bootstrap \ | ||
&& ./configure \ | ||
--prefix=/usr/local \ | ||
--enable-ipmievd \ | ||
--enable-ipmishell \ | ||
--enable-intf-lan \ | ||
--enable-intf-lanplus \ | ||
--enable-intf-open \ | ||
&& make \ | ||
&& make install \ | ||
&& apk del build-deps | ||
|
||
WORKDIR /tmp | ||
RUN rm -rf /tmp/ipmitool | ||
|
||
WORKDIR /tmp/ipmi | ||
## Get IPMI IANA resource, to prevent dependency on third party servers at runtime. | ||
WORKDIR /usr/share/misc | ||
RUN wget https://www.iana.org/assignments/enterprise-numbers.txt | ||
|
||
## Pre-reqs | ||
RUN apt-get update | ||
RUN apt-get install ${IPMITOOL_BUILD_DEPENDENCIES} -y | ||
# Supermicro SUM | ||
WORKDIR /tmp/sum | ||
|
||
## Download | ||
RUN git clone -b master ${IPMITOOL_REPO} | ||
WORKDIR /tmp/ipmi/ipmitool | ||
RUN git checkout ${IPMITOOL_COMMIT} | ||
RUN git config --global user.email "[email protected]" | ||
RUN git cherry-pick ${IPMITOOL_CHERRY_PICK} | ||
RUN wget https://www.supermicro.com/Bios/sw_download/698/sum_2.14.0_Linux_x86_64_20240215.tar.gz -O sum.tar.gz | ||
RUN mkdir -p unzipped | ||
RUN tar -xvzf sum.tar.gz -C unzipped --strip-components=1 | ||
|
||
## Install | ||
RUN ./bootstrap | ||
RUN autoreconf -i | ||
RUN ./configure \ | ||
--prefix=/usr/local \ | ||
--enable-ipmievd \ | ||
--enable-ipmishell \ | ||
--enable-intf-lan \ | ||
--enable-intf-lanplus \ | ||
--enable-intf-open | ||
RUN make | ||
RUN make install | ||
RUN cp unzipped/sum /usr/bin/sum #TODO; smc sum has the same name as the gnu command sum (/usr/bin/sum). So we are overwritting it. Sorry not Sorry. | ||
RUN chmod +x /usr/bin/sum | ||
|
||
## Get IPMI IANA resource, to prevent dependency on third party servers at runtime. | ||
WORKDIR /usr/share/misc | ||
RUN wget https://www.iana.org/assignments/enterprise-numbers.txt | ||
WORKDIR /tmp | ||
RUN rm -rf /tmp/sum | ||
|
||
# Build a lean image with dependencies installed. | ||
FROM debian:12.7-slim | ||
COPY --from=stage1 /usr/bin/sum /usr/bin/sum | ||
COPY --from=stage1 /usr/local/bin/ipmitool /usr/local/bin/ipmitool | ||
COPY --from=stage1 /usr/share/misc/enterprise-numbers.txt /usr/share/misc/enterprise-numbers.txt | ||
|
||
## Install runtime dependencies | ||
RUN apt-get update -y | ||
RUN apt-get install libreadline8 --no-install-recommends -y | ||
|
||
# BiosCfg | ||
## Do this because apk can install a ton of junk. | ||
FROM alpine:3.8 | ||
COPY --from=stage1 / / | ||
|
||
## SUM and IPMITOOL is dynamically linked and needs glibc | ||
ENV GLIBC_REPO=https://github.com/sgerrand/alpine-pkg-glibc | ||
ENV GLIBC_VERSION=2.30-r0 | ||
RUN set -ex && \ | ||
apk --update add libstdc++ curl ca-certificates && \ | ||
for pkg in glibc-${GLIBC_VERSION} glibc-bin-${GLIBC_VERSION}; \ | ||
do curl -sSL ${GLIBC_REPO}/releases/download/${GLIBC_VERSION}/${pkg}.apk -o /tmp/${pkg}.apk; done && \ | ||
apk add --allow-untrusted /tmp/*.apk && \ | ||
rm -v /tmp/*.apk && \ | ||
/usr/glibc-compat/sbin/ldconfig /lib /usr/glibc-compat/lib | ||
|
||
# required by ipmitool and sum runtime | ||
RUN apk add --update --upgrade --no-cache --virtual run-deps \ | ||
ca-certificates \ | ||
libcrypto1.0 \ | ||
readline | ||
|
||
COPY bioscfg /usr/sbin/bioscfg | ||
RUN chmod +x /usr/sbin/bioscfg | ||
|
||
|
||
ENTRYPOINT ["/usr/sbin/bioscfg"] |
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
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
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