Conversation
tadeboro
left a comment
There was a problem hiding this comment.
Thank you for your contribution. But before we can merge this, we would need at least some documentation about how to use the added Dockerfile and how to start the mock server using Docker.
Another thing that bothers me about the current Dockerfile is the fact that we copy the recordings into the image, which is far from ideal. I would expect that the docker image only has the software installed, and the end-user will supply the recording.
@sstanovnik Any suggestions on how we should implement this? I would probably mount the recording that I want to serve into the container somehow, but if there is a better way of doing this, I will gladly adopt. And I am sorry to drag you into this debate, but you are my go-to person for Docker-related things.
|
I think the main question here is what the dockerfile is for. The main usage I see is to avoid having to install ruby et al, instead just encapsulating this into an easily removable/stoppable/restartable container. If there are any plans to allow the mock server to be configured, e.g. to switch the dataset, baking things inside the image could be a solution, but only if also offering a user-configurable directory for additional recordings and if this was planned to be distributed standalone, without this repository. Otherwise, yes, mounting a single recording when running the container is the way to go imo. I'd use ...
WORKDIR /app
ADD Gemfile .
RUN bundle
ENTRYPOINT ... --port 80 redfish-recording
...to build the image and docker build -t redfish-recordings
docker run -v ./lenovo-sr650/:/app/redfish-recording -p 80:80 redfish-recordingsto run the image. This would be the same as running the commands already in the readme, but would not require ruby and friends. I'd also avoid running SSL inside the application, instead relying on a reverse proxy. But that's just personal preference. |
|
Thanks for your advice Suppose there are more than one recordings in this repo, e.g.
@tadeboro suggests to provide a clean image without any recording, I totally agree that. |
This repo might need a Dockerfile
In this way, user could launch service easily