Skip to content

Commit f192944

Browse files
committed
Add support for enterprise edition
1 parent c56b697 commit f192944

File tree

3 files changed

+23
-5
lines changed

3 files changed

+23
-5
lines changed

Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ RUN set -ex && \
5757
&& rm -rf /var/lib/apt/lists/*
5858

5959
COPY assets/build/ ${GITLAB_BUILD_DIR}/
60+
ARG GITLAB_EDITION=ce
6061
RUN bash ${GITLAB_BUILD_DIR}/install.sh
6162

6263
COPY assets/runtime/ ${GITLAB_RUNTIME_DIR}/

README.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,20 @@ You can also pull the `latest` tag which is built from the repository *HEAD*
134134
docker pull sameersbn/gitlab:latest
135135
```
136136

137-
Alternatively you can build the image locally.
137+
Alternatively you can build the images locally.
138+
139+
## Community Edition
138140

139141
```bash
140142
docker build -t sameersbn/gitlab github.com/sameersbn/docker-gitlab
141143
```
142144

145+
## Enterprise Edition
146+
147+
```bash
148+
docker build --build-arg GITLAB_EDITION=ee -t sameersbn/gitlab-ee github.com/sameersbn/docker-gitlab
149+
```
150+
143151
# Quick Start
144152

145153
The quickest way to get started is using [docker-compose](https://docs.docker.com/compose/).

assets/build/install.sh

+13-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
#!/bin/bash
22
set -e
33

4-
GITLAB_CLONE_URL=https://gitlab.com/gitlab-org/gitlab-foss.git
4+
GITLAB_EDITION=${GITLAB_EDITION:-ce}
5+
6+
# if we're using the enterprise edition suffix the version with -ee
7+
if [ x"${GITLAB_EDITION}" = x"ee" ] ; then
8+
GITLAB_VERSION="${GITLAB_VERSION}-ee"
9+
GITLAB_CLONE_URL=https://gitlab.com/gitlab-org/gitlab.git
10+
else
11+
GITLAB_CLONE_URL=https://gitlab.com/gitlab-org/gitlab-foss.git
12+
fi
13+
514
GITLAB_SHELL_URL=https://gitlab.com/gitlab-org/gitlab-shell/-/archive/v${GITLAB_SHELL_VERSION}/gitlab-shell-v${GITLAB_SHELL_VERSION}.tar.bz2
615
GITLAB_PAGES_URL=https://gitlab.com/gitlab-org/gitlab-pages.git
716
GITLAB_GITALY_URL=https://gitlab.com/gitlab-org/gitaly.git
@@ -63,12 +72,12 @@ exec_as_git git config --global gc.auto 0
6372
exec_as_git git config --global repack.writeBitmaps true
6473
exec_as_git git config --global receive.advertisePushOptions true
6574

66-
# shallow clone gitlab-foss
67-
echo "Cloning gitlab-foss v.${GITLAB_VERSION}..."
75+
# shallow clone gitlab
76+
echo "Cloning gitlab-${GITLAB_EDITION} v.${GITLAB_VERSION}..."
6877
exec_as_git git clone -q -b v${GITLAB_VERSION} --depth 1 ${GITLAB_CLONE_URL} ${GITLAB_INSTALL_DIR}
6978

7079
if [[ -d "${GITLAB_BUILD_DIR}/patches" ]]; then
71-
echo "Applying patches for gitlab-foss..."
80+
echo "Applying patches for gitlab-${GITLAB_EDITION}..."
7281
exec_as_git git -C ${GITLAB_INSTALL_DIR} apply --ignore-whitespace < ${GITLAB_BUILD_DIR}/patches/*.patch
7382
fi
7483

0 commit comments

Comments
 (0)