Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion dmtf/buildImage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
# Build and tag images
docker rmi redfish-simulator
docker build -t "redfish-simulator" .
docker tag -f redfish-simulator:latest localhost:5000/redfish-simulator
2 changes: 1 addition & 1 deletion dmtf/redfish-setup.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

function start_apache {
[ -f "/run/apache2/apache2.pid" ] && rm "/run/apache2/apache2.pid"
[ -f "/run/apache2/apache2.pid" ] && rm -f "/run/apache2/apache2.pid"
echo "Launching apache2 in foreground with /usr/sbin/apache2ctl -DFOREGROUND -k start"
/usr/sbin/apache2ctl -DFOREGROUND -k start
}
Expand Down
11 changes: 6 additions & 5 deletions dmtf/run-redfish-simulator.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/bin/bash

# Build the docker container first
docker build -t localhost:5000/redfish-simulator:latest .
# Th -p option needs to be after the run command. No warning is given if before but doesn't work
docker rm "redfish-simulator"
docker run -d -p 8000:80 --name "redfish-simulator" localhost:5000/redfish-simulator:latest
docker ps -a | grep -q "redfish-simulator:latest"
if [ "$?" -eq 0 ]; then
docker rm "redfish-simulator"
fi
# The -p option needs to be after the run command. No warning is given if before but doesn't work
docker run -d -p 8000:80 --name "redfish-simulator" redfish-simulator:latest
echo "Launch your browser and load http://localhost:8000/redfish/v1"