Skip to content

Commit

Permalink
Updates based on feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
mraineri committed Nov 11, 2020
1 parent dd41c34 commit 175b037
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
3 changes: 1 addition & 2 deletions Dockerfile
Expand Up @@ -13,8 +13,7 @@ COPY rfSsdpServer.py redfishMockupServer.py /usr/src/app/
ADD public-rackmount1 /usr/src/app/public-rackmount1

# Env settings
ENV INSIDE_DOCKER_CONTAINER Yes
EXPOSE 8000
HEALTHCHECK CMD curl --fail http://127.0.0.1:8000/redfish/v1 || exit 1
WORKDIR /usr/src/app
ENTRYPOINT ["python", "/usr/src/app/redfishMockupServer.py"]
ENTRYPOINT ["python", "/usr/src/app/redfishMockupServer.py", "-H", "0.0.0.0"]
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -63,7 +63,7 @@ If no mockup is specified, the mockup server will serve the DMTF's "public-rackm

If running as a Docker container, you can either:
* Pull the container from Docker Hub: `docker pull dmtf/redfish-mockup-server:latest`
* Build a container from source: `docker build -t dmtf/redfish-mockup-server:latest`
* Build a container from source: `docker build -t dmtf/redfish-mockup-server:latest .`

The following will run the container using the built-in "public-rackmount1" mockup:
```bash
Expand Down
6 changes: 0 additions & 6 deletions redfishMockupServer.py
Expand Up @@ -19,7 +19,6 @@
import os
import ssl
import logging
import socket
from http.server import BaseHTTPRequestHandler, HTTPServer
from urllib.parse import urlparse, urlunparse, parse_qs
from rfSsdpServer import RfSSDPServer
Expand Down Expand Up @@ -695,11 +694,6 @@ def main():
shortForm = args.short_form
ssdpStart = args.ssdp

# If inside a Docker container, expose on all interfaces
if os.environ.get('INSIDE_DOCKER_CONTAINER', False):
hostname=socket.gethostbyname(socket.gethostname())
port=8000

# check if mockup path was specified. If not, use the built-in mockup
if mockDirPath is None:
mockDirPath = 'public-rackmount1'
Expand Down

0 comments on commit 175b037

Please sign in to comment.