On the BitExpert blog Stephan Hochdöfer has written up a post showing how to "Dockerize" GitLab review apps to create a consistent platform for these self-contained environments.
Last year GitLab introduced the Review Apps feature. Review Apps are app environments that are created dynamically every time you push a new branch up to GitLab. As a bonus point the app environments are automatically deleted when the branch is deleted. Since we moved to using docker for quite a few of our projects I was keen on figuring out how to combine Docker and the GitLab Review Apps functionality as the documentation only mentions NGINX as a way to run Review Apps. As it turns out, it is rather simple to deploy docker containers as a Review App.
He describes the environment he needs and which tools he'll be using to perform the build of the environments. He then defines the sample GitLab configuration file including the "build" stage. He briefly explains the steps this follows then shows the configuration for the "deploy" step, grabbing the latest image from his Docker repo and running it. He ends the post with an "undeploy" stage that removes the Docker build automatically when the environment is no longer needed.