Skip to content
This repository has been archived by the owner on Dec 16, 2019. It is now read-only.

Commit

Permalink
Add Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Shihta committed Jul 17, 2019
1 parent e5296be commit 99fc2b5
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM ruby:2.5-alpine
ENV BIND=0.0.0.0 PORT=8000 USER=admin PASS=passadmin SSL=TRUE RECORDING=lenovo-sr650
ADD . /app
WORKDIR /app
RUN bundle
ENTRYPOINT sh -xc '[ $SSL = "TRUE" ] && SSLCMD="--ssl" || SSLCMD=""; bundle exec redfish serve $SSLCMD --user $USER --pass $PASS --bind $BIND --port $PORT $RECORDING'
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,30 @@ will fill our browser.
To terminate the server, just press `CTRL+c`.

And this is basically all there is to it.


## Docker

The `Dockerfile` is used to build a *ready-to-use* image. It contains all
available recordings. You just need to choose one and then launch it.
If you don't want to build yourself image, you could directly pull
`shihta/redfish-recordings`.

### Environment variables

* BIND - The IP you want to bind, default is `0.0.0.0`
* PORT - The port you want to expose, default is `8000`
* USER - Username for authentication, default is `admin`
* PASS - Password for authentication, default is `passadmin`
* SSL - Set it to `TRUE` for *HTTPS*, otherwise it will provide *HTTP* service.
Default is `TRUE`
* RECORDING - Which recording will be serve, default is `lenovo-sr650`

### Integrate with yourself recording

It's easy to integrate with your local recording. You just need to put your
recording folder on `/app` and then change `RECORDING` to the folder name.
e.g.
```
docker run -v $PWD/newtype:/app/newtype -e RECORDING=newtype shihta/redfish-recordings
```

0 comments on commit 99fc2b5

Please sign in to comment.