-
Notifications
You must be signed in to change notification settings - Fork 108
Setup DuckRails via Docker
A docker image is available at docker hub under iridakos/duckrails.
This image is being produce automatically each time something is pushed in the master branch of the repository or when a new release of DuckRails takes place.
To obtain the image with the latest master branch code, use this command from your terminal:
docker pull iridakos/duckrails
This command will automatically fetch the :latest
tag of the image.
To obtain a release image, use the following command from your terminal:
docker pull iridakos/duckrails:release-<version>
Replace <version>
with the version of DuckRails that you want to use.
You can view all available docker image tags for DuckRails here.
Example command for version 2.1.0:
docker pull iridakos/duckrails:release-v2.1.0
To start the application and bind it to a port (ex. 4000) use:
docker run -p <your_port>:80 -v <volume_name>:/opt/duckrails/db iridakos/duckrails:<tag>
- Replace
<port>
with the port in which you want to access the application. - Replace
<tag>
with the tag of the images that you have downloaded. - Replace
<volume_name>
with the desired volume name. This will allow you to keep the mocks saved in the database after stopping the docker container. Use the same volume the next time you start DuckRails and your mocks will be there.
For example, if you downloaded version 2.1.0 and you want to access the application on port 8080, the command becomes:
docker run -p 8080:80 -v duckrails:/opt/duckrails/db iridakos/duckrails:release-v2.1.0
You should see something like this:
Navigate to http://localhost:8080
and you should be seeing the application's home page.
Well, hAPI mocking!
- DuckRails - 2017 Wiki pages.
- Feel free to request for documentation that you believe is missing by opening issues with the label
wiki