GitLab is a complete DevOps platform, delivered as a single application. This makes GitLab unique and makes Concurrent DevOps possible, unlocking your organization from the constraints of a pieced together toolchain. Join us for a live Q&A to learn how GitLab can give you unmatched visibility and higher levels of efficiency in a single application across the DevOps lifecycle.
Learn more about GitLab: https://about.gitlab.com/
This Docker container makes it easy to get an instance of GitLab CE up and running.
Based on Official Ubuntu Docker Image with some minor hack:
- Packaging by Packer Docker builder and Ansible provisioner in single layer
- Handle
ENTRYPOINT
with catatonit
For the VOLUME
directory that is used to store the repository data
(amongst other things) we recommend mounting a host directory as a data
volume,
or via a named volume if using a docker version >= 1.9.
Config GitLab CE Server (/etc/gitlab/config.rb
):
# GitLab CE external URL.
external_url "EXTERNAL_URL"
# Prevent Postgres from trying to allocate 25% of total memory
postgresql['shared_buffers'] = '1MB'
# Disable Prometheus node_exporter inside Docker.
node_exporter['enable'] = false
# Manage accounts with docker.
manage_accounts['enable'] = false
# Explicitly disable init detection since we are running on a container.
package['detect_init'] = false
Start GitLab CE Server:
# Pull latest image
docker pull alvistack/gitlab-ce-17.7
# Run as detach
docker run \
-itd \
--name gitlab-ce \
--publish 22:22 \
--publish 80:80 \
--publish 443:443 \
--volume /etc/gitlab:/etc/gitlab \
--volume /var/log/gitlab:/var/log/gitlab \
--volume /var/opt/gitlab:/var/opt/gitlab \
alvistack/gitlab-ce-17.7
Success. GitLab CE is now available on http://localhost:80
To upgrade to a more recent version of GitLab CE Server you can simply stop the GitLab CE container and start a new one based on a more recent image:
docker stop gitlab-ce
docker rm gitlab-ce
docker run ... (see above)
As your data is stored in the data volume directory on the host, it will still be available after the upgrade.
Note: Please make sure that you don't accidentally remove the gitlab-ce container and its volumes using the -v option.
For evaluations you can use the built-in database that will store its
files in the GitLab CE Server home directory. In that case it is
sufficient to create a backup archive of the directory on the host that
is used as a volume (/var/opt/gitlab
in the example above).
Release tags could be find from GitHub Release of this repository. Thus using these tags will ensure you are running the most up to date stable version of this image.
Version tags ended with .0.0
are rolling release rebuild by GitLab
pipeline in
weekly basis. Thus using these tags will ensure you are running the
latest packages provided by the base image project.
- Code released under Apache License 2.0
- Docs released under CC BY 4.0
- Wong Hoi Sing Edison