GitLab CE with HTTPS Using Docker

Introduction

Note: For information on using GitLab to set up a private CICD solution from scratch, see this article.

Lately, you could say that I’ve been going all out on Docker. I recently built a new server which runs Ubuntu with Docker and Docker Compose installed doing some heavy lifting for me. It makes perfect sense for my given situation which involves navigating several tools I’m leveraging to build software.

For those who are unfamiliar with Docker, it’s a wonderful tool that takes virtualization to the next level using containers. It’s very resource efficient and easy to use (after a little learning). Best of all, it runs on Windows, Mac, and Linux. This software is so outstanding that many companies (including the one I work for) are adopting it as part of their overall IT strategy; it’s great for DevOps.

Due to my recent embrace of Docker, I had the need to transition from TFS (Team Foundation Server) to GitLab CE since the latter plays nice on Linux. Granted, that’s not to say that TFS isn’t a good piece of software (it’s spectacular and can stand on its own) but my investment in Docker required something Linux friendly.

Using GitLab CE with Docker

It’s easy to find a starting point for using GitLab CE with Docker. The official Docker image for it is outstanding. However, what wasn’t so straightforward was setting up HTTPS using a self-signed certificate or setting up some common configuration options such as SMTP for email notifications, backup frequency, etc.

If you want to get GitLab CE up and running on Docker with HTTPS using a self-signed certificate, then this article is for you. I’ve done all the heavy lifting for you and shared the work on this GitHub repository. Just follow the instructions found there and you should be good to go.

Referencing the README.md

I spent some time creating the README.md which is included with the GitHub repository. Jump to that file for complete details and the latest updates.

Conclusion

Getting GitLab CE working with HTTPS using a self-signed certificate isn’t always a straightforward process. Certainly, there are a few examples that exist in the wild, but I could never find anything that worked perfectly for me. This is why I created my own and shared it with the world. I hope that you find this useful for your current needs. You are welcome to ask any questions or submit pull requests to improve what I’ve shared, and good luck with your future endeavors.

Scroll to Top