Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv E1DD270288B4E60
&& rm -rf /var/lib/apt/lists/*

COPY assets/build/ ${GITLAB_BUILD_DIR}/
ARG GITLAB_EDITION=ce

@splattael splattael Feb 7, 2020

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since GitLab moved to a single codebase (see https://about.gitlab.com/blog/2019/08/23/a-single-codebase-for-gitlab-community-and-enterprise-edition/) the naming has changed (although the redirects still work!). It's now gitlab-org/gitlab-foss (suffix is -foss; former -ce) and gitlab-org/gitlab (no suffix; former -ee).

FYI removing the EE folder from gitlab-org/gitlab (rm -fr ./ee) gives you basically the FOSS version.

Edit: It's a bit more than just removing ee/: https://gitlab.com/gitlab-org/merge-train/-/blob/034051459339b14d4244e557f6c6429a5d0273fd/bin/merge-train#L141-145

So, maybe it's safer to clone twice.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, both EE => CE and CE => EE procedures require some manual work:

  1. https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/downgrade_ee_to_ce/README.md
  2. https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/update/upgrading_from_ce_to_ee.md

Some or procedures are not applicable to docker environments as they are applied at container start or build (cache clearing, deps installation, db migrations). So migrations are also the discussion point for test and documenting using sameersbn docker images.

I mean now conflict resolving is mainly use the new url for CE, as it made in master at 7ca29df

RUN bash ${GITLAB_BUILD_DIR}/install.sh

COPY assets/runtime/ ${GITLAB_RUNTIME_DIR}/
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,20 @@ You can also pull the `latest` tag which is built from the repository *HEAD*
docker pull sameersbn/gitlab:latest
```

Alternatively you can build the image locally.
Alternatively you can build the images locally.

## Community Edition

```bash
docker build -t sameersbn/gitlab github.com/sameersbn/docker-gitlab
```

## Enterprise Edition

```bash
docker build --build-arg GITLAB_EDITION=ee -t sameersbn/gitlab-ee github.com/sameersbn/docker-gitlab
```

# Quick Start

The quickest way to get started is using [docker-compose](https://docs.docker.com/compose/).
Expand Down
11 changes: 9 additions & 2 deletions assets/build/install.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
#!/bin/bash
set -e

GITLAB_CLONE_URL=https://gitlab.com/gitlab-org/gitlab-ce.git
GITLAB_EDITION=${GITLAB_EDITION:-ce}

# if we're using the enterprise edition suffix the version with -ee
if [ x"${GITLAB_EDITION}" = x"ee" ] ; then
GITLAB_VERSION="${GITLAB_VERSION}-ee"
fi

GITLAB_CLONE_URL=https://gitlab.com/gitlab-org/gitlab-${GITLAB_EDITION}.git
GITLAB_SHELL_URL=https://gitlab.com/gitlab-org/gitlab-shell/repository/archive.tar.gz
GITLAB_WORKHORSE_URL=https://gitlab.com/gitlab-org/gitlab-workhorse.git
GITLAB_PAGES_URL=https://gitlab.com/gitlab-org/gitlab-pages.git
Expand Down Expand Up @@ -63,7 +70,7 @@ exec_as_git git config --global gc.auto 0
exec_as_git git config --global repack.writeBitmaps true

# shallow clone gitlab-ce
echo "Cloning gitlab-ce v.${GITLAB_VERSION}..."
echo "Cloning gitlab-${GITLAB_EDITION} v.${GITLAB_VERSION}..."
exec_as_git git clone -q -b v${GITLAB_VERSION} --depth 1 ${GITLAB_CLONE_URL} ${GITLAB_INSTALL_DIR}

GITLAB_SHELL_VERSION=${GITLAB_SHELL_VERSION:-$(cat ${GITLAB_INSTALL_DIR}/GITLAB_SHELL_VERSION)}
Expand Down