I tried to spin up a local development server of the REST API documentation.
I followed all the steps given in the README.md file as mentioned here but when I tried to start the server using
docker run --rm --name slate -v $(pwd)/build:/srv/slate/build -v $(pwd)/source/index.html.md:/srv/slate/source/index.html.md -v $(pwd)/source/includes:/srv/slate/source/includes -v $(pwd)/source/images/logo.png:/srv/slate/source/images/logo.png -p 4567:4567 slatedocs/slate serve
I got an error stating
docker: invalid reference format: repository name must be lowercase.
I did some research online and found that i had to enclose the $(pwd)
statements in backquotes like this
docker run --rm --name slate -v `$(pwd)/build:/srv/slate/build` -v `$(pwd)/source/index.html.md:/srv/slate/source/index.html.md` -v `$(pwd)/source/includes:/srv/slate/source/includes` -v `$(pwd)/source/images/logo.png:/srv/slate/source/images/logo.png` -p 4567:4567 slatedocs/slate serve
As mentioned here on Reddit https://www.reddit.com/r/docker/comments/o1fa57/comment/h220xzj/?utm_source=share&utm_medium=web2x&context=3
The error then went away and this was the output when I ran the edited command
bash: /home/user/Web: No such file or directory
bash: /home/user/Web: No such file or directory
bash: /home/user/Web: No such file or directory
bash: /home/user/Web: No such file or directory
== The Middleman is loading
== Sprockets will render css with ruby sass
consider using Sprockets 4.x to render with SassC
== View your site at "http://localhost:4567", "http://127.0.0.1:4567"
== Inspect your site configuration at "http://localhost:4567/__middleman", "http://127.0.0.1:4567/__middleman"
When I open localhost:4567
, I get the default slate template and not the OpenMRS version of the documentation. I think this is because, the files containing information about openMRS documentation were not found.
NOTE : I am in the correct directory when I run this command.
ls
CODE_OF_CONDUCT.md openmrs-contrib-rest-api-docs.iml source
LICENSE README.md
I also downloaded the slate image as mentioned here https://hub.docker.com/r/slatedocs/slate
using docker pull slatedocs/slate