File tree Expand file tree Collapse file tree 3 files changed +23
-5
lines changed Expand file tree Collapse file tree 3 files changed +23
-5
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ RUN set -ex && \
5757 && rm -rf /var/lib/apt/lists/*
5858
5959COPY assets/build/ ${GITLAB_BUILD_DIR}/
60+ ARG GITLAB_EDITION=ce
6061RUN bash ${GITLAB_BUILD_DIR}/install.sh
6162
6263COPY assets/runtime/ ${GITLAB_RUNTIME_DIR}/
Original file line number Diff line number Diff line change @@ -134,12 +134,20 @@ You can also pull the `latest` tag which is built from the repository *HEAD*
134134docker 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
140142docker 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
145153The quickest way to get started is using [ docker-compose] ( https://docs.docker.com/compose/ ) .
Original file line number Diff line number Diff line change 11#! /bin/bash
22set -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+
514GITLAB_SHELL_URL=https://gitlab.com/gitlab-org/gitlab-shell/-/archive/v${GITLAB_SHELL_VERSION} /gitlab-shell-v${GITLAB_SHELL_VERSION} .tar.bz2
615GITLAB_WORKHORSE_URL=https://gitlab.com/gitlab-org/gitlab-workhorse.git
716GITLAB_PAGES_URL=https://gitlab.com/gitlab-org/gitlab-pages.git
@@ -64,12 +73,12 @@ exec_as_git git config --global gc.auto 0
6473exec_as_git git config --global repack.writeBitmaps true
6574exec_as_git git config --global receive.advertisePushOptions true
6675
67- # shallow clone gitlab-foss
68- echo " Cloning gitlab-foss v.${GITLAB_VERSION} ..."
76+ # shallow clone gitlab
77+ echo " Cloning gitlab-${GITLAB_EDITION} v.${GITLAB_VERSION} ..."
6978exec_as_git git clone -q -b v${GITLAB_VERSION} --depth 1 ${GITLAB_CLONE_URL} ${GITLAB_INSTALL_DIR}
7079
7180if [[ -d " ${GITLAB_BUILD_DIR} /patches" ]]; then
72- echo " Applying patches for gitlab-foss ..."
81+ echo " Applying patches for gitlab-${GITLAB_EDITION} ..."
7382exec_as_git git -C ${GITLAB_INSTALL_DIR} apply --ignore-whitespace < ${GITLAB_BUILD_DIR} /patches/* .patch
7483fi
7584
You can’t perform that action at this time.
0 commit comments