File tree Expand file tree Collapse file tree 2 files changed +33
-2
lines changed Expand file tree Collapse file tree 2 files changed +33
-2
lines changed Original file line number Diff line number Diff line change @@ -9,12 +9,13 @@ RUN apk update && \
9
9
echo "install: --no-rdoc --no-ri" > /etc/gemrc && \
10
10
gem install json_pure daemons && \
11
11
gem install facter -v ${FACTER_VERSION} && \
12
- mkdir -p /etc/facter/facts.d && \
13
12
find /usr/lib/ruby/gems/2.2.0/gems/facter-${FACTER_VERSION} -type f -exec sed -i 's:/proc/:/host-proc/:g' {} + && \
14
13
find /usr/lib/ruby/gems/2.2.0/gems/facter-${FACTER_VERSION} -type f -exec sed -i 's:/dev/:/host-dev/:g' {} + && \
15
14
find /usr/lib/ruby/gems/2.2.0/gems/facter-${FACTER_VERSION} -type f -exec sed -i 's:/host-dev/null:/dev/null:g' {} + && \
16
15
find /usr/lib/ruby/gems/2.2.0/gems/facter-${FACTER_VERSION} -type f -exec sed -i 's:/sys/:/host-sys/:g' {} +
17
16
ADD hnl_mk*.rb /usr/local/bin/
18
17
ADD hanlon_microkernel/*.rb /usr/local/lib/ruby/hanlon_microkernel/
19
- ADD hanlon_microkernel/facter/*.rb /usr/local/lib/site_ruby/facter/
18
+ ADD entrypoint.sh /
19
+ ADD README.md /
20
20
21
+ ENTRYPOINT ['/entrypoint.sh' ]
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # ----------------------------------------------------------------------------
4
+ # Docker entrypoint script for Hanlon microkernel
5
+ # ----------------------------------------------------------------------------
6
+ set -e
7
+ declare -rx SCRIPT=${0##*/ }
8
+
9
+ # Default application if nothing is specified
10
+ if [ -z " ${1: 0: 1} " ]; then
11
+ set -- start_mk
12
+ fi
13
+
14
+ case $1 in
15
+ start_mk)
16
+ 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
21
+ ;;
22
+ help|info)
23
+ set -- cat /README.md
24
+ ;;
25
+ version|ver)
26
+ set -- cat /container-tmp-files/mk-version.yml | grep mk_version
27
+ esac
28
+
29
+ # echo "Executing: $@"
30
+ exec " $@ "
You can’t perform that action at this time.
0 commit comments