{"id":80345,"date":"2025-10-15T16:14:10","date_gmt":"2025-10-15T16:14:10","guid":{"rendered":"https:\/\/www.newsbeep.com\/nz\/80345\/"},"modified":"2025-10-15T16:14:10","modified_gmt":"2025-10-15T16:14:10","slug":"how-to-quickly-deploy-gitlab-via-docker","status":"publish","type":"post","link":"https:\/\/www.newsbeep.com\/nz\/80345\/","title":{"rendered":"How to Quickly Deploy GitLab via Docker"},"content":{"rendered":"<p><a href=\"https:\/\/about.gitlab.com\/?utm_content=inline+mention\" class=\"ext-link\" target=\"_blank\" rel=\"external  nofollow noopener\" onclick=\"this.target=&#039;_blank&#039;;\">GitLab<\/a> is a <a href=\"https:\/\/thenewstack.io\/introduction-to-devops\/\" class=\"local-link\" rel=\"nofollow noopener\" target=\"_blank\">DevOps<\/a> platform that provides a single location for the entire software development cycle. This developer-centric app includes version control with <a href=\"https:\/\/thenewstack.io\/need-to-know-git-start-here\/\" class=\"local-link\" rel=\"nofollow noopener\" target=\"_blank\">Git<\/a>, <a href=\"https:\/\/thenewstack.io\/introduction-to-ci-cd\/\" class=\"local-link\" rel=\"nofollow noopener\" target=\"_blank\">CI\/CD pipelines<\/a>, issue tracking and <a href=\"https:\/\/thenewstack.io\/why-docker-scout-is-changing-how-developers-scan-for-vulnerabilities\/\" class=\"local-link\" rel=\"nofollow noopener\" target=\"_blank\">security scanning<\/a>.<\/p>\n<p><a href=\"https:\/\/trends.builtwith.com\/websitelist\/GitLab\" class=\"ext-link\" rel=\"external  nofollow noopener\" onclick=\"this.target=&#039;_blank&#039;;\" target=\"_blank\">According to BuiltWith<\/a>, there are over 21,000 sites using GitLab, so this tool is nothing to sneeze at.<\/p>\n<p>GitLab can be self-hosted or used via a third-party service. If you\u2019re looking to save money and retain your organization\u2019s privacy, the locally deployed option might be the best route. You might be surprised to find out that deploying an instance of GitLab on your <a href=\"https:\/\/thenewstack.io\/git-set-up-a-local-repository-accessible-by-lan\/\" class=\"local-link\" rel=\"nofollow noopener\" target=\"_blank\">LAN<\/a> is much easier than you might think.<\/p>\n<p>I\u2019m going to show you how to do just that.<\/p>\n<p>What You\u2019ll Need<\/p>\n<p>To deploy GitLab to your LAN, you\u2019ll need a hosting machine that supports Docker. I\u2019m going to demonstrate the process with Ubuntu Server 24.04, so if your machine uses a different operating system, you\u2019ll need to adjust the installation of Docker accordingly. Beyond the installation of Docker, the deployment will be the same across the board.<\/p>\n<p>Read to make this happen?<\/p>\n<p>Installing Docker<\/p>\n<p>On the off chance your hosting machine doesn\u2019t already have Docker installed, here\u2019s how it\u2019s done.<\/p>\n<p>The first step is to add the official Docker GPG key with the commands:<\/p>\n<p>Once the above commands are completed, add the required Docker repository with:<\/p>\n<p>You can now install everything with the following command:<\/p>\n<p>You will also have to add your user to the Docker group, so you can actually run the Docker command without sudo privileges. This is done with the command:<\/p>\n<p>Log out and log back in so the changes take effect.<\/p>\n<p>Deploying GitLab<\/p>\n<p>The first step in the deployment is to pull the official GitLab image, which can be done with the following command:<\/p>\n<p>When the pull completes, verify its success with the command:<\/p>\n<p>You should see the GitLab image included in the output.<\/p>\n<p>Next, we\u2019ll deploy the container with the command:<\/p>\n<p>If you\u2019re already using port 8000, you can change that to an unused port. Make sure to do that before you issue the deploy command; otherwise, you\u2019ll have to stop the container, remove it and start all over.<\/p>\n<p>The deployment process will take some time, so either sit back and watch the code fly by or go take care of something else. The entire deployment process can take from 5-20 minutes (depending on the speed of your machine and network). You\u2019ll see a lot of action run output, which might seem to stall; just let it continue to do its thing without interruption.<\/p>\n<p>Accessing GitLab<\/p>\n<p>To make sure everything is up and running, open a browser on your LAN and point it to <a href=\"http:\/\/server:8000\" class=\"ext-link\" rel=\"external  nofollow\" onclick=\"this.target=&#039;_blank&#039;;\">http:\/\/SERVER:8000<\/a>. You should see a login window (Figure 1).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-22803104\" class=\"size-full wp-image-22803104\" src=\"https:\/\/www.newsbeep.com\/nz\/wp-content\/uploads\/2025\/10\/5c6c9434-screenshot-2025-10-14-at-2.04.52\u202fpm.png\" alt=\"\" width=\"1352\" height=\"998\"\/><\/p>\n<p id=\"caption-attachment-22803104\" class=\"wp-caption-text\">Figure 1. GitLab is deployed, and now it\u2019s time to log in.<\/p>\n<p>Obviously, you don\u2019t have login credentials, and you can\u2019t simply click a \u201ccreate account\u201d button for this. Instead, the user is root, and we have to access the container to extract the password.<\/p>\n<p>Since you deployed the container in detached mode (with the -d option), you should have access to the terminal. You\u2019ll need to find the container ID, which can be done with the command:<\/p>\n<p>The output should look something like this:<\/p>\n<p>To access the container, issue the command:<\/p>\n<p>Where ID is the ID of your container.<\/p>\n<p>This will print out the GitLab root password for your instance. You should see something like this in the output:<\/p>\n<p>Do note that the password will be automatically deleted 24 hours after your first login\/configuration.<\/p>\n<p>Go back to the GitLab login screen, type root as the username and paste the extracted password into the password field.<\/p>\n<p>You should now find yourself on the main page of your GitLab deployment (Figure 2).\u00a0<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-22803105\" class=\"size-full wp-image-22803105\" src=\"https:\/\/www.newsbeep.com\/nz\/wp-content\/uploads\/2025\/10\/33915dfd-screenshot-2025-10-14-at-2.13.45\u202fpm.png\" alt=\"\" width=\"2740\" height=\"1534\"\/><\/p>\n<p id=\"caption-attachment-22803105\" class=\"wp-caption-text\">Figure 2. The GitLab main page is fairly straightforward.<\/p>\n<p>Before you begin to use GitLab, you might want to deactivate the ability for anyone to register. You can do this by simply clicking the deactivate button.<\/p>\n<p>And that\u2019s all there is to deploying GitLab to your LAN. Enjoy that fresh new CI\/CD smell.<\/p>\n<p>\t<a class=\"row youtube-subscribe-block\" href=\"https:\/\/youtube.com\/thenewstack?sub_confirmation=1\" target=\"_blank\" rel=\"nofollow noopener\"><\/p>\n<p>\n\t\t\t\tYOUTUBE.COM\/THENEWSTACK\n\t\t\t<\/p>\n<p>\n\t\t\t\tTech moves fast, don&#8217;t miss an episode. Subscribe to our YouTube<br \/>\n\t\t\t\tchannel to stream all our podcasts, interviews, demos, and more.\n\t\t\t<\/p>\n<p>\t\t\t\tSUBSCRIBE<\/p>\n<p>\t<\/a><\/p>\n<p>    Group<br \/>\n    Created with Sketch.<\/p>\n<p>\t\t<a href=\"https:\/\/thenewstack.io\/author\/jack-wallen\/\" class=\"author-more-link\" rel=\"nofollow noopener\" target=\"_blank\"><\/p>\n<p>\t\t\t\t\t<img decoding=\"async\" class=\"post-author-avatar\" src=\"https:\/\/www.newsbeep.com\/nz\/wp-content\/uploads\/2025\/09\/d7cbfb14-cropped-6e7d5ccd-jack_wallen.jpg\"\/><\/p>\n<p>\n\t\t\t\t\t\t\tJack Wallen is what happens when a Gen Xer mind-melds with present-day snark. Jack is a seeker of truth and a writer of words with a quantum mechanical pencil and a disjointed beat of sound and soul. Although he resides&#8230;\t\t\t\t\t\t<\/p>\n<p>\t\t\t\t\t\tRead more from Jack Wallen\t\t\t\t\t\t<\/p>\n<p>\t\t<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"GitLab is a DevOps platform that provides a single location for the entire software development cycle. This developer-centric&hellip;\n","protected":false},"author":2,"featured_media":80346,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[111,139,69,145,61890],"class_list":["post-80345","post","type-post","status-publish","format-standard","has-post-thumbnail","category-technology","tag-new-zealand","tag-newzealand","tag-nz","tag-technology","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.newsbeep.com\/nz\/wp-json\/wp\/v2\/posts\/80345","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.newsbeep.com\/nz\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.newsbeep.com\/nz\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/nz\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/nz\/wp-json\/wp\/v2\/comments?post=80345"}],"version-history":[{"count":0,"href":"https:\/\/www.newsbeep.com\/nz\/wp-json\/wp\/v2\/posts\/80345\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/nz\/wp-json\/wp\/v2\/media\/80346"}],"wp:attachment":[{"href":"https:\/\/www.newsbeep.com\/nz\/wp-json\/wp\/v2\/media?parent=80345"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.newsbeep.com\/nz\/wp-json\/wp\/v2\/categories?post=80345"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.newsbeep.com\/nz\/wp-json\/wp\/v2\/tags?post=80345"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}