README.md 2.91 KB
Newer Older
1
### Cloud native GitLab Docker Images
2

Jason Plum's avatar
Jason Plum committed
3
Most images are based on the [Debian Linux](https://debian.org), using the [official buster-slim image](https://hub.docker.com/_/debian). A few smaller, quick running tasks are based on [Alpine Linux](https://alpinelinux.org/), using the [official image](https://hub.docker.com/_/alpine/).
4

5
6
Built using [the official source installation instructions](http://docs.gitlab.com/ee/install/installation.html) with some Alpine specific fixes
and some dependency compilation tweaks picked up from from the [omnibus build packages](https://gitlab.com/gitlab-org/omnibus-gitlab).
7
8
9
10

Each directory contains the `Dockerfile` for a specific component of the
infrastructure needed to run GitLab.

11
* [rails](/gitlab-rails) - The Rails code needed for both API and web.
12
* [webservice](/gitlab-webservice) - The webservice container that exposes Rails webservers (Puma).
13
14
15
* [workhorse](/gitlab-workhorse) - The GitLab Workhorse container providing smart-proxy in front of Rails.
* [sidekiq](/gitlab-sidekiq) - The Sidekiq container that runs async Rails jobs.
* [shell](/gitlab-shell) - Running GitLab Shell and OpenSSH to provide git over ssh, and authorized keys support from the database
Marin Jankovski's avatar
Marin Jankovski committed
16
* [gitaly](/gitaly) - The Gitaly container that provides a distributed git repos
17
* [task-runner](/gitlab-task-runner) - The task runner container provides utilities for direct interaction with the application suite, without interruping service containers.
DJ Mountney's avatar
DJ Mountney committed
18
19
20

### Dev environment using Docker Compose

21
A dev test environment is provided with docker-compose.
DJ Mountney's avatar
DJ Mountney committed
22

23
To run the environment:
DJ Mountney's avatar
DJ Mountney committed
24
25

```bash
DJ Mountney's avatar
DJ Mountney committed
26
27
# Grab the latest Images
docker-compose pull
28
# Start GitLab
DJ Mountney's avatar
DJ Mountney committed
29
30
docker-compose up
```
31

32
33
The instance should then be reachable at `http://localhost:3000`

Jason Plum's avatar
Jason Plum committed
34
35
36
37
38
39
40
41
42
43
44
45
46
#### Registry access

As the `docker-compose` deployment does not make use of TLS, `docker` will
be "unhappy". To address this, you can add the following to
`/etc/docker/daemon.json` and then restart the service. It will allow
any hostname that resolves to `127.0.0.1` to be handled as insecure.

```json
{
  "insecure-registries" : [ "127.0.0.1" ]
}
```

47
48
49
50
51
52
53
54
55
56
57
58
59
60
### Design of the Containers

#### Configuration

Support for configuration is intended to be as follows:

1. Mounting templates for the config files already supported by our different software (gitlab.yml, database.yml, resque.yml, etc)
2. Additionally support the environement variables supported by the software, like https://docs.gitlab.com/ce/administration/environment_variables.html (support them by not doing anything that would drop them from being passed to the running process)
3. Add ENV variables for configuring the custom code we use in the containers, like the the ERB rendering in the templates, and any wrapper/helper commands


> For Kubernetes specifically we are mostly relying on the mounting the config
files from ConfigMap objects. With the occasional ENV variable to control the
custom container code.
61
62
63
64

### Links

1. [Building Images](docs/build.md)