Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Setup DuckRails via Docker
A docker image is available at docker hub under iridakos/duckrails.
Getting the image
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>
<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
Starting the application
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>
<port>with the port in which you want to access the application.
<tag>with the tag of the images that you have downloaded.
<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:
http://localhost:8080 and you should be seeing the application's home page.
Well, hAPI mocking!