Skip to content

Commit a433bfb

Browse files
committed
Including ipmitool package and fix downloading rubygems
1 parent 8c4cecf commit a433bfb

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@ FROM gliderlabs/alpine
33
ENV FACTER_VERSION 2.4.6
44

55
# Install any dependencies needed
6+
ADD ipmitool-*.apk /tmp
67
RUN apk update && \
78
apk add bash sed dmidecode ruby ruby-irb open-lldp util-linux open-vm-tools sudo && \
8-
apk add lshw ipmitool --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted && \
9+
apk add lshw --update-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ --allow-untrusted && \
10+
apk add --allow-untrusted /tmp/ipmitool-*.apk && \
911
echo "install: --no-rdoc --no-ri" > /etc/gemrc && \
12+
curl -o $(dirname $(gem which rubygems))/rubygems/ssl_certs/AddTrustExternalCARoot-2048.pem https://curl.haxx.se/ca/cacert.pem && \
1013
gem install json_pure daemons && \
1114
gem install facter -v ${FACTER_VERSION} && \
1215
find /usr/lib/ruby/gems/2.2.0/gems/facter-${FACTER_VERSION} -type f -exec sed -i 's:/proc/:/host-proc/:g' {} + && \
@@ -15,7 +18,8 @@ RUN apk update && \
1518
find /usr/lib/ruby/gems/2.2.0/gems/facter-${FACTER_VERSION} -type f -exec sed -i 's:/sys/:/host-sys/:g' {} +
1619
ADD hnl_mk*.rb /usr/local/bin/
1720
ADD hanlon_microkernel/*.rb /usr/local/lib/ruby/hanlon_microkernel/
21+
ADD hanlon_microkernel/facter/ /usr/local/lib/site_ruby/facter/
1822
ADD entrypoint.sh /
1923
ADD README.md /
2024

21-
ENTRYPOINT ['/entrypoint.sh']
25+
ENTRYPOINT ["/entrypoint.sh"]

entrypoint.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@
44
# Docker entrypoint script for Hanlon microkernel
55
# ----------------------------------------------------------------------------
66
set -e
7+
78
declare -rx SCRIPT=${0##*/}
89

10+
# Setup to allow access to BMC from within container
11+
modprobe ipmi_si
12+
ln -s /host-dev/ipmi* /dev
13+
914
# Default application if nothing is specified
1015
if [ -z "${1:0:1}" ]; then
1116
set -- start_mk
@@ -14,10 +19,6 @@ fi
1419
case $1 in
1520
start_mk)
1621
set -- /bin/bash -c '/usr/local/bin/hnl_mk_init.rb && read -p "waiting..."'
17-
18-
# Setup to allow access to BMC from within container
19-
modprobe ipmi_si
20-
ln -s /host-dev/ipmi* /dev
2122
;;
2223
help|info)
2324
set -- cat /README.md
@@ -27,4 +28,4 @@ case $1 in
2728
esac
2829

2930
#echo "Executing: $@"
30-
exec "$@"
31+
exec "$@"

0 commit comments

Comments
 (0)