Skip to content

Commit

Permalink
Fix sum tool segfault (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakeschuurmans authored Nov 6, 2024
1 parent 3ad6e7e commit 2b3deeb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:12.5-slim AS stage1
FROM debian:12.7-slim AS stage1

# 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
Expand All @@ -14,8 +14,8 @@ RUN mkdir -p unzipped
RUN tar -xvzf sum.tar.gz -C unzipped --strip-components=1

## Install
RUN cp unzipped/sum /usr/sbin/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/sbin/sum
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

# IPMI Tool
#
Expand Down Expand Up @@ -58,8 +58,8 @@ WORKDIR /usr/share/misc
RUN wget https://www.iana.org/assignments/enterprise-numbers.txt

# Build a lean image with dependencies installed.
FROM debian:12.5-slim
COPY --from=stage1 /usr/sbin/sum /usr/bin/sum
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

Expand All @@ -72,4 +72,5 @@ RUN apt-get install libreadline8 --no-install-recommends -y
COPY bioscfg /usr/sbin/bioscfg
RUN chmod +x /usr/sbin/bioscfg


ENTRYPOINT ["/usr/sbin/bioscfg"]
7 changes: 2 additions & 5 deletions chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,13 @@ spec:
capabilities:
drop:
- NET_RAW
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 1000
resources:
limits:
cpu: 200m
memory: 200M
memory: 500M
requests:
cpu: 200m
memory: 200M
memory: 500M
ports:
- name: metrics-port
containerPort: 9090
Expand Down

0 comments on commit 2b3deeb

Please sign in to comment.