Merge branch 'dmtf' of github.com:bcornec/python-redfish into dmtf

This commit is contained in:
Bruno Cornec 2015-06-03 01:08:52 +02:00
commit c90255d6f0
3 changed files with 23 additions and 3 deletions

5
dmtf/buildImage.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
# Build and tag images
docker build -t "redfish-simulator" .
docker tag redfish-simulator:latest localhost:5000/redfish-simulator

View File

@ -1,4 +1,20 @@
#!/bin/bash
function start_apache {
echo "Launching apache2 in foreground with /usr/sbin/apache2ctl -DFOREGROUND -k start"
/usr/sbin/apache2ctl -DFOREGROUND -k start
}
function stop_apache {
echo "Stopping apache2"
/usr/sbin/apache2ctl stop
}
# Trap to have a clean exit
trap stop_apache HUP INT QUIT KILL TERM
# Main
cd /var/www/html
unzip -q -o /tmp/DSP2043_0.96.0a.zip
mkdir -p redfish
@ -7,5 +23,4 @@ ln -sf .. v1
cd ..
ip a
#sed -i -e 's/Listen 80/Listen 8000/' /etc/apache2/ports.conf
echo "Launching apache2 in foreground with /usr/sbin/apache2ctl -DFOREGROUND -k start"
/usr/sbin/apache2ctl -DFOREGROUND -k start
start_apache

View File

@ -1,4 +1,4 @@
#!/bin/bash
# Th -p option needs to be after the run command. No warning is given if before but doesn't work
docker run -p 8000:80 localhost:5000/pb:docker-redfish
docker run -d -p 8000:80 --name "redfish-simulator" localhost:5000/redfish-simulator