I maintain my own Docker Image that I use to run my Gitlab CI build commands (it has the AWS CLI, NodeJS, and few other things).
I use Gitlab CI to automatically build, test, and push the image do Docker Hub whenever I commit new changes.
Here’s what my .gitlab-ci.yml looks like:
You can set the environment variables in:
and scroll down to:
Gitlab CI Runner Setup
Make sure your Gitlab CI Runner is running in privileged mode:
In your /etc/gitlab-runner/config.toml file (inside your Gitlab CI Runner server, which is usually the same server as the server running your Gitlab server), make sure privileged = true
Security Warning: privileged mode will allow your Docker containers to gain privileged access to the host. Only use this Gitlab CI runner with repositories you trust.
Never miss new posts
Get the latest tech innovation news from Ryan delivered straight to your inbox!