From 10a9cddf794ce5f022c43f9cfdabf720c18cc45c Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Wed, 16 Sep 2020 09:29:52 +0800 Subject: [PATCH 01/46] Create Dockerfile --- 11.1.4/Dockerfile | 105 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 11.1.4/Dockerfile diff --git a/11.1.4/Dockerfile b/11.1.4/Dockerfile new file mode 100644 index 0000000..beae090 --- /dev/null +++ b/11.1.4/Dockerfile @@ -0,0 +1,105 @@ +##################### +# Building Stage # +##################### +FROM gitlab/gitlab-ce:11.1.4-ce.0 as builder + +ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails +ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git + +# Reference: +# * https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/config/software/gitlab-rails.rb +# * https://gitlab.com/gitlab-org/gitlab-ce/blob/master/.gitlab-ci.yml +RUN set -xe \ + && echo " # Preparing ..." \ + && export DEBIAN_FRONTEND=noninteractive \ + && export SSL_CERT_DIR=/etc/ssl/certs/ \ + && export GIT_SSL_CAPATH=/etc/ssl/certs/ \ + && curl -sL https://deb.nodesource.com/setup_8.x | bash - \ + && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ + && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ + && apt-get update \ + && apt-get install -yqq lsb-release patch nodejs python build-essential yarn cmake + +RUN set -xe \ + && echo " # Generating translation patch ..." \ + && cd /tmp \ + && git clone ${GITLAB_GIT_ZH} gitlab \ + && cd gitlab \ + && export IGNORE_DIRS=':!qa :!spec :!features :!.gitignore :!.gitlab :!locale :!app/assets/ :!vendor/assets/' \ + && git diff --diff-filter=d v11.1.4..v11.1.4-zh -- . ${IGNORE_DIRS} > ../zh_CN.diff \ + && echo " # Patching ..." \ + && patch -d ${GITLAB_DIR} -p1 < ../zh_CN.diff \ + && echo " # Copy assets files ..." \ + && git checkout v11.1.4-zh \ + && cp -R locale ${GITLAB_DIR}/ \ + && mkdir -p ${GITLAB_DIR}/app \ + && cp -R app/assets ${GITLAB_DIR}/app/ \ + && mkdir -p ${GITLAB_DIR}/vendor \ + && cp -R vendor/assets ${GITLAB_DIR}/vendor/ + +RUN set -xe \ + && echo " # Regenerating the assets" \ + && cd ${GITLAB_DIR} \ + && cp config/gitlab.yml.example config/gitlab.yml \ + && cp config/database.yml.postgresql config/database.yml \ + && cp config/secrets.yml.example config/secrets.yml \ + && rm -rf public/assets \ + && export NODE_ENV=production \ + && export RAILS_ENV=production \ + && export SETUP_DB=false \ + && export USE_DB=false \ + && export SKIP_STORAGE_VALIDATION=true \ + && export WEBPACK_REPORT=true \ + && export NO_COMPRESSION=true \ + && export NO_PRIVILEGE_DROP=true \ + && export NODE_OPTIONS=--max-old-space-size=4086 \ + && yarn install --frozen-lockfile \ + && bin/bundle install --frozen \ + && bin/rake gettext:compile \ + && bin/rake gitlab:assets:compile + +RUN set -xe \ + && echo " # Cleaning ..." \ + && yarn cache clean \ + && rm -rf log \ + tmp \ + config/gitlab.yml \ + config/database.yml \ + config/secrets.yml \ + .secret \ + .gitlab_shell_secret \ + .gitlab_workhorse_secret \ + app/assets \ + node_modules \ + && find /usr/lib/ -name __pycache__ | xargs rm -rf \ + && rm -rf /tmp/gitlab /tmp/*.diff /root/.cache /var/lib/apt/lists/* + + +###################### +# Production Stage # +###################### +FROM gitlab/gitlab-ce:11.1.4-ce.0 as production + +RUN set -xe \ + && export DEBIAN_FRONTEND=noninteractive \ + && apt-get update \ + && apt-get install -yqq locales tzdata \ + && locale-gen en_US.UTF-8 \ + && rm -rf /var/lib/apt/lists/* + +ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 +ENV TZ=Asia/Shanghai + +ENV GITLAB_VERSION=v11.1.4 +ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails +ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git +ENV GITLAB_GIT_COMMIT_UPSTREAM=v11.1.4 +ENV GITLAB_GIT_COMMIT_ZH=v11.1.4-zh + +COPY --from=builder ${GITLAB_DIR}/app ${GITLAB_DIR}/app +COPY --from=builder ${GITLAB_DIR}/public ${GITLAB_DIR}/public +COPY --from=builder ${GITLAB_DIR}/config/application.rb ${GITLAB_DIR}/config/application.rb +COPY --from=builder ${GITLAB_DIR}/config/initializers ${GITLAB_DIR}/config/initializers +COPY --from=builder ${GITLAB_DIR}/config/locales ${GITLAB_DIR}/config/locales +COPY --from=builder ${GITLAB_DIR}/lib/gitlab ${GITLAB_DIR}/lib/gitlab +COPY --from=builder ${GITLAB_DIR}/locale ${GITLAB_DIR}/locale From b866d9dfca7f6413e7453adbd65a3b54da53d0a1 Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Wed, 16 Sep 2020 09:30:54 +0800 Subject: [PATCH 02/46] Delete Dockerfile --- 11.1.4/Dockerfile | 105 ---------------------------------------------- 1 file changed, 105 deletions(-) delete mode 100644 11.1.4/Dockerfile diff --git a/11.1.4/Dockerfile b/11.1.4/Dockerfile deleted file mode 100644 index beae090..0000000 --- a/11.1.4/Dockerfile +++ /dev/null @@ -1,105 +0,0 @@ -##################### -# Building Stage # -##################### -FROM gitlab/gitlab-ce:11.1.4-ce.0 as builder - -ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails -ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git - -# Reference: -# * https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/config/software/gitlab-rails.rb -# * https://gitlab.com/gitlab-org/gitlab-ce/blob/master/.gitlab-ci.yml -RUN set -xe \ - && echo " # Preparing ..." \ - && export DEBIAN_FRONTEND=noninteractive \ - && export SSL_CERT_DIR=/etc/ssl/certs/ \ - && export GIT_SSL_CAPATH=/etc/ssl/certs/ \ - && curl -sL https://deb.nodesource.com/setup_8.x | bash - \ - && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ - && apt-get update \ - && apt-get install -yqq lsb-release patch nodejs python build-essential yarn cmake - -RUN set -xe \ - && echo " # Generating translation patch ..." \ - && cd /tmp \ - && git clone ${GITLAB_GIT_ZH} gitlab \ - && cd gitlab \ - && export IGNORE_DIRS=':!qa :!spec :!features :!.gitignore :!.gitlab :!locale :!app/assets/ :!vendor/assets/' \ - && git diff --diff-filter=d v11.1.4..v11.1.4-zh -- . ${IGNORE_DIRS} > ../zh_CN.diff \ - && echo " # Patching ..." \ - && patch -d ${GITLAB_DIR} -p1 < ../zh_CN.diff \ - && echo " # Copy assets files ..." \ - && git checkout v11.1.4-zh \ - && cp -R locale ${GITLAB_DIR}/ \ - && mkdir -p ${GITLAB_DIR}/app \ - && cp -R app/assets ${GITLAB_DIR}/app/ \ - && mkdir -p ${GITLAB_DIR}/vendor \ - && cp -R vendor/assets ${GITLAB_DIR}/vendor/ - -RUN set -xe \ - && echo " # Regenerating the assets" \ - && cd ${GITLAB_DIR} \ - && cp config/gitlab.yml.example config/gitlab.yml \ - && cp config/database.yml.postgresql config/database.yml \ - && cp config/secrets.yml.example config/secrets.yml \ - && rm -rf public/assets \ - && export NODE_ENV=production \ - && export RAILS_ENV=production \ - && export SETUP_DB=false \ - && export USE_DB=false \ - && export SKIP_STORAGE_VALIDATION=true \ - && export WEBPACK_REPORT=true \ - && export NO_COMPRESSION=true \ - && export NO_PRIVILEGE_DROP=true \ - && export NODE_OPTIONS=--max-old-space-size=4086 \ - && yarn install --frozen-lockfile \ - && bin/bundle install --frozen \ - && bin/rake gettext:compile \ - && bin/rake gitlab:assets:compile - -RUN set -xe \ - && echo " # Cleaning ..." \ - && yarn cache clean \ - && rm -rf log \ - tmp \ - config/gitlab.yml \ - config/database.yml \ - config/secrets.yml \ - .secret \ - .gitlab_shell_secret \ - .gitlab_workhorse_secret \ - app/assets \ - node_modules \ - && find /usr/lib/ -name __pycache__ | xargs rm -rf \ - && rm -rf /tmp/gitlab /tmp/*.diff /root/.cache /var/lib/apt/lists/* - - -###################### -# Production Stage # -###################### -FROM gitlab/gitlab-ce:11.1.4-ce.0 as production - -RUN set -xe \ - && export DEBIAN_FRONTEND=noninteractive \ - && apt-get update \ - && apt-get install -yqq locales tzdata \ - && locale-gen en_US.UTF-8 \ - && rm -rf /var/lib/apt/lists/* - -ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 -ENV TZ=Asia/Shanghai - -ENV GITLAB_VERSION=v11.1.4 -ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails -ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git -ENV GITLAB_GIT_COMMIT_UPSTREAM=v11.1.4 -ENV GITLAB_GIT_COMMIT_ZH=v11.1.4-zh - -COPY --from=builder ${GITLAB_DIR}/app ${GITLAB_DIR}/app -COPY --from=builder ${GITLAB_DIR}/public ${GITLAB_DIR}/public -COPY --from=builder ${GITLAB_DIR}/config/application.rb ${GITLAB_DIR}/config/application.rb -COPY --from=builder ${GITLAB_DIR}/config/initializers ${GITLAB_DIR}/config/initializers -COPY --from=builder ${GITLAB_DIR}/config/locales ${GITLAB_DIR}/config/locales -COPY --from=builder ${GITLAB_DIR}/lib/gitlab ${GITLAB_DIR}/lib/gitlab -COPY --from=builder ${GITLAB_DIR}/locale ${GITLAB_DIR}/locale From f9f595df55ddb40289fb20a729a18a7469148a95 Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Wed, 16 Sep 2020 09:31:49 +0800 Subject: [PATCH 03/46] Create 11.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 升级到11.1.4 --- 11.1 | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 11.1 diff --git a/11.1 b/11.1 new file mode 100644 index 0000000..beae090 --- /dev/null +++ b/11.1 @@ -0,0 +1,105 @@ +##################### +# Building Stage # +##################### +FROM gitlab/gitlab-ce:11.1.4-ce.0 as builder + +ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails +ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git + +# Reference: +# * https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/config/software/gitlab-rails.rb +# * https://gitlab.com/gitlab-org/gitlab-ce/blob/master/.gitlab-ci.yml +RUN set -xe \ + && echo " # Preparing ..." \ + && export DEBIAN_FRONTEND=noninteractive \ + && export SSL_CERT_DIR=/etc/ssl/certs/ \ + && export GIT_SSL_CAPATH=/etc/ssl/certs/ \ + && curl -sL https://deb.nodesource.com/setup_8.x | bash - \ + && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ + && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ + && apt-get update \ + && apt-get install -yqq lsb-release patch nodejs python build-essential yarn cmake + +RUN set -xe \ + && echo " # Generating translation patch ..." \ + && cd /tmp \ + && git clone ${GITLAB_GIT_ZH} gitlab \ + && cd gitlab \ + && export IGNORE_DIRS=':!qa :!spec :!features :!.gitignore :!.gitlab :!locale :!app/assets/ :!vendor/assets/' \ + && git diff --diff-filter=d v11.1.4..v11.1.4-zh -- . ${IGNORE_DIRS} > ../zh_CN.diff \ + && echo " # Patching ..." \ + && patch -d ${GITLAB_DIR} -p1 < ../zh_CN.diff \ + && echo " # Copy assets files ..." \ + && git checkout v11.1.4-zh \ + && cp -R locale ${GITLAB_DIR}/ \ + && mkdir -p ${GITLAB_DIR}/app \ + && cp -R app/assets ${GITLAB_DIR}/app/ \ + && mkdir -p ${GITLAB_DIR}/vendor \ + && cp -R vendor/assets ${GITLAB_DIR}/vendor/ + +RUN set -xe \ + && echo " # Regenerating the assets" \ + && cd ${GITLAB_DIR} \ + && cp config/gitlab.yml.example config/gitlab.yml \ + && cp config/database.yml.postgresql config/database.yml \ + && cp config/secrets.yml.example config/secrets.yml \ + && rm -rf public/assets \ + && export NODE_ENV=production \ + && export RAILS_ENV=production \ + && export SETUP_DB=false \ + && export USE_DB=false \ + && export SKIP_STORAGE_VALIDATION=true \ + && export WEBPACK_REPORT=true \ + && export NO_COMPRESSION=true \ + && export NO_PRIVILEGE_DROP=true \ + && export NODE_OPTIONS=--max-old-space-size=4086 \ + && yarn install --frozen-lockfile \ + && bin/bundle install --frozen \ + && bin/rake gettext:compile \ + && bin/rake gitlab:assets:compile + +RUN set -xe \ + && echo " # Cleaning ..." \ + && yarn cache clean \ + && rm -rf log \ + tmp \ + config/gitlab.yml \ + config/database.yml \ + config/secrets.yml \ + .secret \ + .gitlab_shell_secret \ + .gitlab_workhorse_secret \ + app/assets \ + node_modules \ + && find /usr/lib/ -name __pycache__ | xargs rm -rf \ + && rm -rf /tmp/gitlab /tmp/*.diff /root/.cache /var/lib/apt/lists/* + + +###################### +# Production Stage # +###################### +FROM gitlab/gitlab-ce:11.1.4-ce.0 as production + +RUN set -xe \ + && export DEBIAN_FRONTEND=noninteractive \ + && apt-get update \ + && apt-get install -yqq locales tzdata \ + && locale-gen en_US.UTF-8 \ + && rm -rf /var/lib/apt/lists/* + +ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 +ENV TZ=Asia/Shanghai + +ENV GITLAB_VERSION=v11.1.4 +ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails +ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git +ENV GITLAB_GIT_COMMIT_UPSTREAM=v11.1.4 +ENV GITLAB_GIT_COMMIT_ZH=v11.1.4-zh + +COPY --from=builder ${GITLAB_DIR}/app ${GITLAB_DIR}/app +COPY --from=builder ${GITLAB_DIR}/public ${GITLAB_DIR}/public +COPY --from=builder ${GITLAB_DIR}/config/application.rb ${GITLAB_DIR}/config/application.rb +COPY --from=builder ${GITLAB_DIR}/config/initializers ${GITLAB_DIR}/config/initializers +COPY --from=builder ${GITLAB_DIR}/config/locales ${GITLAB_DIR}/config/locales +COPY --from=builder ${GITLAB_DIR}/lib/gitlab ${GITLAB_DIR}/lib/gitlab +COPY --from=builder ${GITLAB_DIR}/locale ${GITLAB_DIR}/locale From 7a9712e83f4e3d1c6588402fd8c29dba9dd9d18a Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Wed, 16 Sep 2020 09:32:11 +0800 Subject: [PATCH 04/46] Delete 11.1 --- 11.1 | 105 ----------------------------------------------------------- 1 file changed, 105 deletions(-) delete mode 100644 11.1 diff --git a/11.1 b/11.1 deleted file mode 100644 index beae090..0000000 --- a/11.1 +++ /dev/null @@ -1,105 +0,0 @@ -##################### -# Building Stage # -##################### -FROM gitlab/gitlab-ce:11.1.4-ce.0 as builder - -ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails -ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git - -# Reference: -# * https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/config/software/gitlab-rails.rb -# * https://gitlab.com/gitlab-org/gitlab-ce/blob/master/.gitlab-ci.yml -RUN set -xe \ - && echo " # Preparing ..." \ - && export DEBIAN_FRONTEND=noninteractive \ - && export SSL_CERT_DIR=/etc/ssl/certs/ \ - && export GIT_SSL_CAPATH=/etc/ssl/certs/ \ - && curl -sL https://deb.nodesource.com/setup_8.x | bash - \ - && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ - && apt-get update \ - && apt-get install -yqq lsb-release patch nodejs python build-essential yarn cmake - -RUN set -xe \ - && echo " # Generating translation patch ..." \ - && cd /tmp \ - && git clone ${GITLAB_GIT_ZH} gitlab \ - && cd gitlab \ - && export IGNORE_DIRS=':!qa :!spec :!features :!.gitignore :!.gitlab :!locale :!app/assets/ :!vendor/assets/' \ - && git diff --diff-filter=d v11.1.4..v11.1.4-zh -- . ${IGNORE_DIRS} > ../zh_CN.diff \ - && echo " # Patching ..." \ - && patch -d ${GITLAB_DIR} -p1 < ../zh_CN.diff \ - && echo " # Copy assets files ..." \ - && git checkout v11.1.4-zh \ - && cp -R locale ${GITLAB_DIR}/ \ - && mkdir -p ${GITLAB_DIR}/app \ - && cp -R app/assets ${GITLAB_DIR}/app/ \ - && mkdir -p ${GITLAB_DIR}/vendor \ - && cp -R vendor/assets ${GITLAB_DIR}/vendor/ - -RUN set -xe \ - && echo " # Regenerating the assets" \ - && cd ${GITLAB_DIR} \ - && cp config/gitlab.yml.example config/gitlab.yml \ - && cp config/database.yml.postgresql config/database.yml \ - && cp config/secrets.yml.example config/secrets.yml \ - && rm -rf public/assets \ - && export NODE_ENV=production \ - && export RAILS_ENV=production \ - && export SETUP_DB=false \ - && export USE_DB=false \ - && export SKIP_STORAGE_VALIDATION=true \ - && export WEBPACK_REPORT=true \ - && export NO_COMPRESSION=true \ - && export NO_PRIVILEGE_DROP=true \ - && export NODE_OPTIONS=--max-old-space-size=4086 \ - && yarn install --frozen-lockfile \ - && bin/bundle install --frozen \ - && bin/rake gettext:compile \ - && bin/rake gitlab:assets:compile - -RUN set -xe \ - && echo " # Cleaning ..." \ - && yarn cache clean \ - && rm -rf log \ - tmp \ - config/gitlab.yml \ - config/database.yml \ - config/secrets.yml \ - .secret \ - .gitlab_shell_secret \ - .gitlab_workhorse_secret \ - app/assets \ - node_modules \ - && find /usr/lib/ -name __pycache__ | xargs rm -rf \ - && rm -rf /tmp/gitlab /tmp/*.diff /root/.cache /var/lib/apt/lists/* - - -###################### -# Production Stage # -###################### -FROM gitlab/gitlab-ce:11.1.4-ce.0 as production - -RUN set -xe \ - && export DEBIAN_FRONTEND=noninteractive \ - && apt-get update \ - && apt-get install -yqq locales tzdata \ - && locale-gen en_US.UTF-8 \ - && rm -rf /var/lib/apt/lists/* - -ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 -ENV TZ=Asia/Shanghai - -ENV GITLAB_VERSION=v11.1.4 -ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails -ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git -ENV GITLAB_GIT_COMMIT_UPSTREAM=v11.1.4 -ENV GITLAB_GIT_COMMIT_ZH=v11.1.4-zh - -COPY --from=builder ${GITLAB_DIR}/app ${GITLAB_DIR}/app -COPY --from=builder ${GITLAB_DIR}/public ${GITLAB_DIR}/public -COPY --from=builder ${GITLAB_DIR}/config/application.rb ${GITLAB_DIR}/config/application.rb -COPY --from=builder ${GITLAB_DIR}/config/initializers ${GITLAB_DIR}/config/initializers -COPY --from=builder ${GITLAB_DIR}/config/locales ${GITLAB_DIR}/config/locales -COPY --from=builder ${GITLAB_DIR}/lib/gitlab ${GITLAB_DIR}/lib/gitlab -COPY --from=builder ${GITLAB_DIR}/locale ${GITLAB_DIR}/locale From aaddd2ef3f94c46e9988fdc635eea79f7f237dbc Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Wed, 16 Sep 2020 09:32:27 +0800 Subject: [PATCH 05/46] Create Dockerfile --- 11.1/Dockerfile | 105 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 11.1/Dockerfile diff --git a/11.1/Dockerfile b/11.1/Dockerfile new file mode 100644 index 0000000..beae090 --- /dev/null +++ b/11.1/Dockerfile @@ -0,0 +1,105 @@ +##################### +# Building Stage # +##################### +FROM gitlab/gitlab-ce:11.1.4-ce.0 as builder + +ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails +ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git + +# Reference: +# * https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/config/software/gitlab-rails.rb +# * https://gitlab.com/gitlab-org/gitlab-ce/blob/master/.gitlab-ci.yml +RUN set -xe \ + && echo " # Preparing ..." \ + && export DEBIAN_FRONTEND=noninteractive \ + && export SSL_CERT_DIR=/etc/ssl/certs/ \ + && export GIT_SSL_CAPATH=/etc/ssl/certs/ \ + && curl -sL https://deb.nodesource.com/setup_8.x | bash - \ + && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ + && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ + && apt-get update \ + && apt-get install -yqq lsb-release patch nodejs python build-essential yarn cmake + +RUN set -xe \ + && echo " # Generating translation patch ..." \ + && cd /tmp \ + && git clone ${GITLAB_GIT_ZH} gitlab \ + && cd gitlab \ + && export IGNORE_DIRS=':!qa :!spec :!features :!.gitignore :!.gitlab :!locale :!app/assets/ :!vendor/assets/' \ + && git diff --diff-filter=d v11.1.4..v11.1.4-zh -- . ${IGNORE_DIRS} > ../zh_CN.diff \ + && echo " # Patching ..." \ + && patch -d ${GITLAB_DIR} -p1 < ../zh_CN.diff \ + && echo " # Copy assets files ..." \ + && git checkout v11.1.4-zh \ + && cp -R locale ${GITLAB_DIR}/ \ + && mkdir -p ${GITLAB_DIR}/app \ + && cp -R app/assets ${GITLAB_DIR}/app/ \ + && mkdir -p ${GITLAB_DIR}/vendor \ + && cp -R vendor/assets ${GITLAB_DIR}/vendor/ + +RUN set -xe \ + && echo " # Regenerating the assets" \ + && cd ${GITLAB_DIR} \ + && cp config/gitlab.yml.example config/gitlab.yml \ + && cp config/database.yml.postgresql config/database.yml \ + && cp config/secrets.yml.example config/secrets.yml \ + && rm -rf public/assets \ + && export NODE_ENV=production \ + && export RAILS_ENV=production \ + && export SETUP_DB=false \ + && export USE_DB=false \ + && export SKIP_STORAGE_VALIDATION=true \ + && export WEBPACK_REPORT=true \ + && export NO_COMPRESSION=true \ + && export NO_PRIVILEGE_DROP=true \ + && export NODE_OPTIONS=--max-old-space-size=4086 \ + && yarn install --frozen-lockfile \ + && bin/bundle install --frozen \ + && bin/rake gettext:compile \ + && bin/rake gitlab:assets:compile + +RUN set -xe \ + && echo " # Cleaning ..." \ + && yarn cache clean \ + && rm -rf log \ + tmp \ + config/gitlab.yml \ + config/database.yml \ + config/secrets.yml \ + .secret \ + .gitlab_shell_secret \ + .gitlab_workhorse_secret \ + app/assets \ + node_modules \ + && find /usr/lib/ -name __pycache__ | xargs rm -rf \ + && rm -rf /tmp/gitlab /tmp/*.diff /root/.cache /var/lib/apt/lists/* + + +###################### +# Production Stage # +###################### +FROM gitlab/gitlab-ce:11.1.4-ce.0 as production + +RUN set -xe \ + && export DEBIAN_FRONTEND=noninteractive \ + && apt-get update \ + && apt-get install -yqq locales tzdata \ + && locale-gen en_US.UTF-8 \ + && rm -rf /var/lib/apt/lists/* + +ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 +ENV TZ=Asia/Shanghai + +ENV GITLAB_VERSION=v11.1.4 +ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails +ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git +ENV GITLAB_GIT_COMMIT_UPSTREAM=v11.1.4 +ENV GITLAB_GIT_COMMIT_ZH=v11.1.4-zh + +COPY --from=builder ${GITLAB_DIR}/app ${GITLAB_DIR}/app +COPY --from=builder ${GITLAB_DIR}/public ${GITLAB_DIR}/public +COPY --from=builder ${GITLAB_DIR}/config/application.rb ${GITLAB_DIR}/config/application.rb +COPY --from=builder ${GITLAB_DIR}/config/initializers ${GITLAB_DIR}/config/initializers +COPY --from=builder ${GITLAB_DIR}/config/locales ${GITLAB_DIR}/config/locales +COPY --from=builder ${GITLAB_DIR}/lib/gitlab ${GITLAB_DIR}/lib/gitlab +COPY --from=builder ${GITLAB_DIR}/locale ${GITLAB_DIR}/locale From bf6910e56332317c744c92528a7393977f8d60a8 Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Wed, 16 Sep 2020 09:34:32 +0800 Subject: [PATCH 06/46] Update Dockerfile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 升级到11.1.4 --- 11.1/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/11.1/Dockerfile b/11.1/Dockerfile index beae090..fdbe988 100644 --- a/11.1/Dockerfile +++ b/11.1/Dockerfile @@ -1,7 +1,7 @@ ##################### # Building Stage # ##################### -FROM gitlab/gitlab-ce:11.1.4-ce.0 as builder +FROM gitlab/gitlab-ce:11.1.4-ce.0 AS builder ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git From f74e8c35c7b19b90b7d6289f718761b25a5e33c9 Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Wed, 16 Sep 2020 09:35:23 +0800 Subject: [PATCH 07/46] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=88=B011.1.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 11.1/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/11.1/Dockerfile b/11.1/Dockerfile index fdbe988..beae090 100644 --- a/11.1/Dockerfile +++ b/11.1/Dockerfile @@ -1,7 +1,7 @@ ##################### # Building Stage # ##################### -FROM gitlab/gitlab-ce:11.1.4-ce.0 AS builder +FROM gitlab/gitlab-ce:11.1.4-ce.0 as builder ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git From 39fb01d4b4ea88ffcd7cdc7c2b8c9a652e996104 Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Wed, 16 Sep 2020 10:31:25 +0800 Subject: [PATCH 08/46] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=88=B011.11.8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 11.11 | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 11.11 diff --git a/11.11 b/11.11 new file mode 100644 index 0000000..f6facb1 --- /dev/null +++ b/11.11 @@ -0,0 +1,105 @@ +##################### +# Building Stage # +##################### +FROM gitlab/gitlab-ce:11.11.8-ce.0 as builder + +ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails +ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git + +# Reference: +# * https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/config/software/gitlab-rails.rb +# * https://gitlab.com/gitlab-org/gitlab-ce/blob/master/.gitlab-ci.yml +RUN set -xe \ + && echo " # Preparing ..." \ + && export DEBIAN_FRONTEND=noninteractive \ + && export SSL_CERT_DIR=/etc/ssl/certs/ \ + && export GIT_SSL_CAPATH=/etc/ssl/certs/ \ + && curl -sL https://deb.nodesource.com/setup_8.x | bash - \ + && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ + && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ + && apt-get update \ + && apt-get install -yqq lsb-release patch nodejs python build-essential yarn cmake + +RUN set -xe \ + && echo " # Generating translation patch ..." \ + && cd /tmp \ + && git clone ${GITLAB_GIT_ZH} gitlab \ + && cd gitlab \ + && export IGNORE_DIRS=':!qa :!spec :!features :!.gitignore :!.gitlab :!locale :!app/assets/ :!vendor/assets/' \ + && git diff --diff-filter=d v11.11.8..v11.11.8-zh -- . ${IGNORE_DIRS} > ../zh_CN.diff \ + && echo " # Patching ..." \ + && patch -d ${GITLAB_DIR} -p1 < ../zh_CN.diff \ + && echo " # Copy assets files ..." \ + && git checkout v11.11.8-zh \ + && cp -R locale ${GITLAB_DIR}/ \ + && mkdir -p ${GITLAB_DIR}/app \ + && cp -R app/assets ${GITLAB_DIR}/app/ \ + && mkdir -p ${GITLAB_DIR}/vendor \ + && cp -R vendor/assets ${GITLAB_DIR}/vendor/ + +RUN set -xe \ + && echo " # Regenerating the assets" \ + && cd ${GITLAB_DIR} \ + && cp config/gitlab.yml.example config/gitlab.yml \ + && cp config/database.yml.postgresql config/database.yml \ + && cp config/secrets.yml.example config/secrets.yml \ + && rm -rf public/assets \ + && export NODE_ENV=production \ + && export RAILS_ENV=production \ + && export SETUP_DB=false \ + && export USE_DB=false \ + && export SKIP_STORAGE_VALIDATION=true \ + && export WEBPACK_REPORT=true \ + && export NO_COMPRESSION=true \ + && export NO_PRIVILEGE_DROP=true \ + && export NODE_OPTIONS=--max-old-space-size=4086 \ + && yarn install --frozen-lockfile \ + && bin/bundle install --frozen \ + && bin/rake gettext:compile \ + && bin/rake gitlab:assets:compile + +RUN set -xe \ + && echo " # Cleaning ..." \ + && yarn cache clean \ + && rm -rf log \ + tmp \ + config/gitlab.yml \ + config/database.yml \ + config/secrets.yml \ + .secret \ + .gitlab_shell_secret \ + .gitlab_workhorse_secret \ + app/assets \ + node_modules \ + && find /usr/lib/ -name __pycache__ | xargs rm -rf \ + && rm -rf /tmp/gitlab /tmp/*.diff /root/.cache /var/lib/apt/lists/* + + +###################### +# Production Stage # +###################### +FROM gitlab/gitlab-ce:11.11.8-ce.0 as production + +RUN set -xe \ + && export DEBIAN_FRONTEND=noninteractive \ + && apt-get update \ + && apt-get install -yqq locales tzdata \ + && locale-gen en_US.UTF-8 \ + && rm -rf /var/lib/apt/lists/* + +ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 +ENV TZ=Asia/Shanghai + +ENV GITLAB_VERSION=v11.11.8 +ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails +ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git +ENV GITLAB_GIT_COMMIT_UPSTREAM=v11.11.8 +ENV GITLAB_GIT_COMMIT_ZH=v11.11.8-zh + +COPY --from=builder ${GITLAB_DIR}/app ${GITLAB_DIR}/app +COPY --from=builder ${GITLAB_DIR}/public ${GITLAB_DIR}/public +COPY --from=builder ${GITLAB_DIR}/config/application.rb ${GITLAB_DIR}/config/application.rb +COPY --from=builder ${GITLAB_DIR}/config/initializers ${GITLAB_DIR}/config/initializers +COPY --from=builder ${GITLAB_DIR}/config/locales ${GITLAB_DIR}/config/locales +COPY --from=builder ${GITLAB_DIR}/lib/gitlab ${GITLAB_DIR}/lib/gitlab +COPY --from=builder ${GITLAB_DIR}/locale ${GITLAB_DIR}/locale From 3a39b47703fa12b81ae578caeacd313e978d42ce Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Wed, 16 Sep 2020 10:31:55 +0800 Subject: [PATCH 09/46] Delete 11.11 --- 11.11 | 105 ---------------------------------------------------------- 1 file changed, 105 deletions(-) delete mode 100644 11.11 diff --git a/11.11 b/11.11 deleted file mode 100644 index f6facb1..0000000 --- a/11.11 +++ /dev/null @@ -1,105 +0,0 @@ -##################### -# Building Stage # -##################### -FROM gitlab/gitlab-ce:11.11.8-ce.0 as builder - -ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails -ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git - -# Reference: -# * https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/config/software/gitlab-rails.rb -# * https://gitlab.com/gitlab-org/gitlab-ce/blob/master/.gitlab-ci.yml -RUN set -xe \ - && echo " # Preparing ..." \ - && export DEBIAN_FRONTEND=noninteractive \ - && export SSL_CERT_DIR=/etc/ssl/certs/ \ - && export GIT_SSL_CAPATH=/etc/ssl/certs/ \ - && curl -sL https://deb.nodesource.com/setup_8.x | bash - \ - && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ - && apt-get update \ - && apt-get install -yqq lsb-release patch nodejs python build-essential yarn cmake - -RUN set -xe \ - && echo " # Generating translation patch ..." \ - && cd /tmp \ - && git clone ${GITLAB_GIT_ZH} gitlab \ - && cd gitlab \ - && export IGNORE_DIRS=':!qa :!spec :!features :!.gitignore :!.gitlab :!locale :!app/assets/ :!vendor/assets/' \ - && git diff --diff-filter=d v11.11.8..v11.11.8-zh -- . ${IGNORE_DIRS} > ../zh_CN.diff \ - && echo " # Patching ..." \ - && patch -d ${GITLAB_DIR} -p1 < ../zh_CN.diff \ - && echo " # Copy assets files ..." \ - && git checkout v11.11.8-zh \ - && cp -R locale ${GITLAB_DIR}/ \ - && mkdir -p ${GITLAB_DIR}/app \ - && cp -R app/assets ${GITLAB_DIR}/app/ \ - && mkdir -p ${GITLAB_DIR}/vendor \ - && cp -R vendor/assets ${GITLAB_DIR}/vendor/ - -RUN set -xe \ - && echo " # Regenerating the assets" \ - && cd ${GITLAB_DIR} \ - && cp config/gitlab.yml.example config/gitlab.yml \ - && cp config/database.yml.postgresql config/database.yml \ - && cp config/secrets.yml.example config/secrets.yml \ - && rm -rf public/assets \ - && export NODE_ENV=production \ - && export RAILS_ENV=production \ - && export SETUP_DB=false \ - && export USE_DB=false \ - && export SKIP_STORAGE_VALIDATION=true \ - && export WEBPACK_REPORT=true \ - && export NO_COMPRESSION=true \ - && export NO_PRIVILEGE_DROP=true \ - && export NODE_OPTIONS=--max-old-space-size=4086 \ - && yarn install --frozen-lockfile \ - && bin/bundle install --frozen \ - && bin/rake gettext:compile \ - && bin/rake gitlab:assets:compile - -RUN set -xe \ - && echo " # Cleaning ..." \ - && yarn cache clean \ - && rm -rf log \ - tmp \ - config/gitlab.yml \ - config/database.yml \ - config/secrets.yml \ - .secret \ - .gitlab_shell_secret \ - .gitlab_workhorse_secret \ - app/assets \ - node_modules \ - && find /usr/lib/ -name __pycache__ | xargs rm -rf \ - && rm -rf /tmp/gitlab /tmp/*.diff /root/.cache /var/lib/apt/lists/* - - -###################### -# Production Stage # -###################### -FROM gitlab/gitlab-ce:11.11.8-ce.0 as production - -RUN set -xe \ - && export DEBIAN_FRONTEND=noninteractive \ - && apt-get update \ - && apt-get install -yqq locales tzdata \ - && locale-gen en_US.UTF-8 \ - && rm -rf /var/lib/apt/lists/* - -ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 -ENV TZ=Asia/Shanghai - -ENV GITLAB_VERSION=v11.11.8 -ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails -ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git -ENV GITLAB_GIT_COMMIT_UPSTREAM=v11.11.8 -ENV GITLAB_GIT_COMMIT_ZH=v11.11.8-zh - -COPY --from=builder ${GITLAB_DIR}/app ${GITLAB_DIR}/app -COPY --from=builder ${GITLAB_DIR}/public ${GITLAB_DIR}/public -COPY --from=builder ${GITLAB_DIR}/config/application.rb ${GITLAB_DIR}/config/application.rb -COPY --from=builder ${GITLAB_DIR}/config/initializers ${GITLAB_DIR}/config/initializers -COPY --from=builder ${GITLAB_DIR}/config/locales ${GITLAB_DIR}/config/locales -COPY --from=builder ${GITLAB_DIR}/lib/gitlab ${GITLAB_DIR}/lib/gitlab -COPY --from=builder ${GITLAB_DIR}/locale ${GITLAB_DIR}/locale From a15309a14ea0996e1f722772c7f2a17045f0123a Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Wed, 16 Sep 2020 10:35:31 +0800 Subject: [PATCH 10/46] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=88=B011.11.8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 11.11/Dockerfile | 105 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 11.11/Dockerfile diff --git a/11.11/Dockerfile b/11.11/Dockerfile new file mode 100644 index 0000000..f6facb1 --- /dev/null +++ b/11.11/Dockerfile @@ -0,0 +1,105 @@ +##################### +# Building Stage # +##################### +FROM gitlab/gitlab-ce:11.11.8-ce.0 as builder + +ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails +ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git + +# Reference: +# * https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/config/software/gitlab-rails.rb +# * https://gitlab.com/gitlab-org/gitlab-ce/blob/master/.gitlab-ci.yml +RUN set -xe \ + && echo " # Preparing ..." \ + && export DEBIAN_FRONTEND=noninteractive \ + && export SSL_CERT_DIR=/etc/ssl/certs/ \ + && export GIT_SSL_CAPATH=/etc/ssl/certs/ \ + && curl -sL https://deb.nodesource.com/setup_8.x | bash - \ + && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ + && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ + && apt-get update \ + && apt-get install -yqq lsb-release patch nodejs python build-essential yarn cmake + +RUN set -xe \ + && echo " # Generating translation patch ..." \ + && cd /tmp \ + && git clone ${GITLAB_GIT_ZH} gitlab \ + && cd gitlab \ + && export IGNORE_DIRS=':!qa :!spec :!features :!.gitignore :!.gitlab :!locale :!app/assets/ :!vendor/assets/' \ + && git diff --diff-filter=d v11.11.8..v11.11.8-zh -- . ${IGNORE_DIRS} > ../zh_CN.diff \ + && echo " # Patching ..." \ + && patch -d ${GITLAB_DIR} -p1 < ../zh_CN.diff \ + && echo " # Copy assets files ..." \ + && git checkout v11.11.8-zh \ + && cp -R locale ${GITLAB_DIR}/ \ + && mkdir -p ${GITLAB_DIR}/app \ + && cp -R app/assets ${GITLAB_DIR}/app/ \ + && mkdir -p ${GITLAB_DIR}/vendor \ + && cp -R vendor/assets ${GITLAB_DIR}/vendor/ + +RUN set -xe \ + && echo " # Regenerating the assets" \ + && cd ${GITLAB_DIR} \ + && cp config/gitlab.yml.example config/gitlab.yml \ + && cp config/database.yml.postgresql config/database.yml \ + && cp config/secrets.yml.example config/secrets.yml \ + && rm -rf public/assets \ + && export NODE_ENV=production \ + && export RAILS_ENV=production \ + && export SETUP_DB=false \ + && export USE_DB=false \ + && export SKIP_STORAGE_VALIDATION=true \ + && export WEBPACK_REPORT=true \ + && export NO_COMPRESSION=true \ + && export NO_PRIVILEGE_DROP=true \ + && export NODE_OPTIONS=--max-old-space-size=4086 \ + && yarn install --frozen-lockfile \ + && bin/bundle install --frozen \ + && bin/rake gettext:compile \ + && bin/rake gitlab:assets:compile + +RUN set -xe \ + && echo " # Cleaning ..." \ + && yarn cache clean \ + && rm -rf log \ + tmp \ + config/gitlab.yml \ + config/database.yml \ + config/secrets.yml \ + .secret \ + .gitlab_shell_secret \ + .gitlab_workhorse_secret \ + app/assets \ + node_modules \ + && find /usr/lib/ -name __pycache__ | xargs rm -rf \ + && rm -rf /tmp/gitlab /tmp/*.diff /root/.cache /var/lib/apt/lists/* + + +###################### +# Production Stage # +###################### +FROM gitlab/gitlab-ce:11.11.8-ce.0 as production + +RUN set -xe \ + && export DEBIAN_FRONTEND=noninteractive \ + && apt-get update \ + && apt-get install -yqq locales tzdata \ + && locale-gen en_US.UTF-8 \ + && rm -rf /var/lib/apt/lists/* + +ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 +ENV TZ=Asia/Shanghai + +ENV GITLAB_VERSION=v11.11.8 +ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails +ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git +ENV GITLAB_GIT_COMMIT_UPSTREAM=v11.11.8 +ENV GITLAB_GIT_COMMIT_ZH=v11.11.8-zh + +COPY --from=builder ${GITLAB_DIR}/app ${GITLAB_DIR}/app +COPY --from=builder ${GITLAB_DIR}/public ${GITLAB_DIR}/public +COPY --from=builder ${GITLAB_DIR}/config/application.rb ${GITLAB_DIR}/config/application.rb +COPY --from=builder ${GITLAB_DIR}/config/initializers ${GITLAB_DIR}/config/initializers +COPY --from=builder ${GITLAB_DIR}/config/locales ${GITLAB_DIR}/config/locales +COPY --from=builder ${GITLAB_DIR}/lib/gitlab ${GITLAB_DIR}/lib/gitlab +COPY --from=builder ${GITLAB_DIR}/locale ${GITLAB_DIR}/locale From 8f009b43f75e2cc5db8efcb0b6badc5cd72428c1 Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Wed, 16 Sep 2020 10:38:43 +0800 Subject: [PATCH 11/46] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=88=B012.10.14?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 12.10/Dockerfile | 105 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 12.10/Dockerfile diff --git a/12.10/Dockerfile b/12.10/Dockerfile new file mode 100644 index 0000000..ff87da2 --- /dev/null +++ b/12.10/Dockerfile @@ -0,0 +1,105 @@ +##################### +# Building Stage # +##################### +FROM gitlab/gitlab-ce:12.10.14-ce.0 as builder + +ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails +ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git + +# Reference: +# * https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/config/software/gitlab-rails.rb +# * https://gitlab.com/gitlab-org/gitlab-ce/blob/master/.gitlab-ci.yml +RUN set -xe \ + && echo " # Preparing ..." \ + && export DEBIAN_FRONTEND=noninteractive \ + && export SSL_CERT_DIR=/etc/ssl/certs/ \ + && export GIT_SSL_CAPATH=/etc/ssl/certs/ \ + && curl -sL https://deb.nodesource.com/setup_8.x | bash - \ + && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ + && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ + && apt-get update \ + && apt-get install -yqq lsb-release patch nodejs python build-essential yarn cmake + +RUN set -xe \ + && echo " # Generating translation patch ..." \ + && cd /tmp \ + && git clone ${GITLAB_GIT_ZH} gitlab \ + && cd gitlab \ + && export IGNORE_DIRS=':!qa :!spec :!features :!.gitignore :!.gitlab :!locale :!app/assets/ :!vendor/assets/' \ + && git diff --diff-filter=d v12.10.14..v12.10.14-zh -- . ${IGNORE_DIRS} > ../zh_CN.diff \ + && echo " # Patching ..." \ + && patch -d ${GITLAB_DIR} -p1 < ../zh_CN.diff \ + && echo " # Copy assets files ..." \ + && git checkout v12.10.14-zh \ + && cp -R locale ${GITLAB_DIR}/ \ + && mkdir -p ${GITLAB_DIR}/app \ + && cp -R app/assets ${GITLAB_DIR}/app/ \ + && mkdir -p ${GITLAB_DIR}/vendor \ + && cp -R vendor/assets ${GITLAB_DIR}/vendor/ + +RUN set -xe \ + && echo " # Regenerating the assets" \ + && cd ${GITLAB_DIR} \ + && cp config/gitlab.yml.example config/gitlab.yml \ + && cp config/database.yml.postgresql config/database.yml \ + && cp config/secrets.yml.example config/secrets.yml \ + && rm -rf public/assets \ + && export NODE_ENV=production \ + && export RAILS_ENV=production \ + && export SETUP_DB=false \ + && export USE_DB=false \ + && export SKIP_STORAGE_VALIDATION=true \ + && export WEBPACK_REPORT=true \ + && export NO_COMPRESSION=true \ + && export NO_PRIVILEGE_DROP=true \ + && export NODE_OPTIONS=--max-old-space-size=4086 \ + && yarn install --frozen-lockfile \ + && bin/bundle install --frozen \ + && bin/rake gettext:compile \ + && bin/rake gitlab:assets:compile + +RUN set -xe \ + && echo " # Cleaning ..." \ + && yarn cache clean \ + && rm -rf log \ + tmp \ + config/gitlab.yml \ + config/database.yml \ + config/secrets.yml \ + .secret \ + .gitlab_shell_secret \ + .gitlab_workhorse_secret \ + app/assets \ + node_modules \ + && find /usr/lib/ -name __pycache__ | xargs rm -rf \ + && rm -rf /tmp/gitlab /tmp/*.diff /root/.cache /var/lib/apt/lists/* + + +###################### +# Production Stage # +###################### +FROM gitlab/gitlab-ce:12.10.14-ce.0 as production + +RUN set -xe \ + && export DEBIAN_FRONTEND=noninteractive \ + && apt-get update \ + && apt-get install -yqq locales tzdata \ + && locale-gen en_US.UTF-8 \ + && rm -rf /var/lib/apt/lists/* + +ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 +ENV TZ=Asia/Shanghai + +ENV GITLAB_VERSION=v12.10.14 +ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails +ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git +ENV GITLAB_GIT_COMMIT_UPSTREAM=v12.10.14 +ENV GITLAB_GIT_COMMIT_ZH=v12.10.14-zh + +COPY --from=builder ${GITLAB_DIR}/app ${GITLAB_DIR}/app +COPY --from=builder ${GITLAB_DIR}/public ${GITLAB_DIR}/public +COPY --from=builder ${GITLAB_DIR}/config/application.rb ${GITLAB_DIR}/config/application.rb +COPY --from=builder ${GITLAB_DIR}/config/initializers ${GITLAB_DIR}/config/initializers +COPY --from=builder ${GITLAB_DIR}/config/locales ${GITLAB_DIR}/config/locales +COPY --from=builder ${GITLAB_DIR}/lib/gitlab ${GITLAB_DIR}/lib/gitlab +COPY --from=builder ${GITLAB_DIR}/locale ${GITLAB_DIR}/locale From 64b8c2c760f48ec486533019d038f207471255b0 Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Wed, 16 Sep 2020 10:42:26 +0800 Subject: [PATCH 12/46] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=88=B013.3.6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 13.3/Dockerfile | 105 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 13.3/Dockerfile diff --git a/13.3/Dockerfile b/13.3/Dockerfile new file mode 100644 index 0000000..7faf4ac --- /dev/null +++ b/13.3/Dockerfile @@ -0,0 +1,105 @@ +##################### +# Building Stage # +##################### +FROM gitlab/gitlab-ce:13.3.6-ce.0 as builder + +ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails +ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git + +# Reference: +# * https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/config/software/gitlab-rails.rb +# * https://gitlab.com/gitlab-org/gitlab-ce/blob/master/.gitlab-ci.yml +RUN set -xe \ + && echo " # Preparing ..." \ + && export DEBIAN_FRONTEND=noninteractive \ + && export SSL_CERT_DIR=/etc/ssl/certs/ \ + && export GIT_SSL_CAPATH=/etc/ssl/certs/ \ + && curl -sL https://deb.nodesource.com/setup_8.x | bash - \ + && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ + && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ + && apt-get update \ + && apt-get install -yqq lsb-release patch nodejs python build-essential yarn cmake + +RUN set -xe \ + && echo " # Generating translation patch ..." \ + && cd /tmp \ + && git clone ${GITLAB_GIT_ZH} gitlab \ + && cd gitlab \ + && export IGNORE_DIRS=':!qa :!spec :!features :!.gitignore :!.gitlab :!locale :!app/assets/ :!vendor/assets/' \ + && git diff --diff-filter=d v13.3.6..v13.3.6-zh -- . ${IGNORE_DIRS} > ../zh_CN.diff \ + && echo " # Patching ..." \ + && patch -d ${GITLAB_DIR} -p1 < ../zh_CN.diff \ + && echo " # Copy assets files ..." \ + && git checkout v13.3.6-zh \ + && cp -R locale ${GITLAB_DIR}/ \ + && mkdir -p ${GITLAB_DIR}/app \ + && cp -R app/assets ${GITLAB_DIR}/app/ \ + && mkdir -p ${GITLAB_DIR}/vendor \ + && cp -R vendor/assets ${GITLAB_DIR}/vendor/ + +RUN set -xe \ + && echo " # Regenerating the assets" \ + && cd ${GITLAB_DIR} \ + && cp config/gitlab.yml.example config/gitlab.yml \ + && cp config/database.yml.postgresql config/database.yml \ + && cp config/secrets.yml.example config/secrets.yml \ + && rm -rf public/assets \ + && export NODE_ENV=production \ + && export RAILS_ENV=production \ + && export SETUP_DB=false \ + && export USE_DB=false \ + && export SKIP_STORAGE_VALIDATION=true \ + && export WEBPACK_REPORT=true \ + && export NO_COMPRESSION=true \ + && export NO_PRIVILEGE_DROP=true \ + && export NODE_OPTIONS=--max-old-space-size=4086 \ + && yarn install --frozen-lockfile \ + && bin/bundle install --frozen \ + && bin/rake gettext:compile \ + && bin/rake gitlab:assets:compile + +RUN set -xe \ + && echo " # Cleaning ..." \ + && yarn cache clean \ + && rm -rf log \ + tmp \ + config/gitlab.yml \ + config/database.yml \ + config/secrets.yml \ + .secret \ + .gitlab_shell_secret \ + .gitlab_workhorse_secret \ + app/assets \ + node_modules \ + && find /usr/lib/ -name __pycache__ | xargs rm -rf \ + && rm -rf /tmp/gitlab /tmp/*.diff /root/.cache /var/lib/apt/lists/* + + +###################### +# Production Stage # +###################### +FROM gitlab/gitlab-ce:13.3.6-ce.0 as production + +RUN set -xe \ + && export DEBIAN_FRONTEND=noninteractive \ + && apt-get update \ + && apt-get install -yqq locales tzdata \ + && locale-gen en_US.UTF-8 \ + && rm -rf /var/lib/apt/lists/* + +ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 +ENV TZ=Asia/Shanghai + +ENV GITLAB_VERSION=v13.3.6 +ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails +ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git +ENV GITLAB_GIT_COMMIT_UPSTREAM=v13.3.6 +ENV GITLAB_GIT_COMMIT_ZH=v13.3.6-zh + +COPY --from=builder ${GITLAB_DIR}/app ${GITLAB_DIR}/app +COPY --from=builder ${GITLAB_DIR}/public ${GITLAB_DIR}/public +COPY --from=builder ${GITLAB_DIR}/config/application.rb ${GITLAB_DIR}/config/application.rb +COPY --from=builder ${GITLAB_DIR}/config/initializers ${GITLAB_DIR}/config/initializers +COPY --from=builder ${GITLAB_DIR}/config/locales ${GITLAB_DIR}/config/locales +COPY --from=builder ${GITLAB_DIR}/lib/gitlab ${GITLAB_DIR}/lib/gitlab +COPY --from=builder ${GITLAB_DIR}/locale ${GITLAB_DIR}/locale From 79734f460809200f1c9463bdf32e7808caf6a1ab Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Wed, 16 Sep 2020 14:44:43 +0800 Subject: [PATCH 13/46] Update README.md --- README.md | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index df4938d..110a978 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,19 @@ # 支持的 tags 和对应的 `Dockerfile` -- [`9.2`, `9.2.10` (*9.2/Dockerfile*)](https://github.com/twang2218/gitlab-ce-zh/blob/master/9.2/Dockerfile) -- [`9.3`, `9.3.11` (*9.3/Dockerfile*)](https://github.com/twang2218/gitlab-ce-zh/blob/master/9.3/Dockerfile) -- [`9.4`, `9.4.6` (*9.4/Dockerfile*)](https://github.com/twang2218/gitlab-ce-zh/blob/master/9.4/Dockerfile) -- [`9.5`, `9.5.8` (*9.5/Dockerfile*)](https://github.com/twang2218/gitlab-ce-zh/blob/master/9.5/Dockerfile) -- [`10.0`, `10.0.3`, `latest` (*10.0/Dockerfile*)](https://github.com/twang2218/gitlab-ce-zh/blob/master/10.0/Dockerfile) -- [`testing` (*testing/Dockerfile*)](https://github.com/twang2218/gitlab-ce-zh/blob/master/testing/Dockerfile) - -[![Build Status](https://travis-ci.org/twang2218/gitlab-ce-zh.svg?branch=master)](https://travis-ci.org/twang2218/gitlab-ce-zh) -[![Image Layers and Size](https://images.microbadger.com/badges/image/twang2218/gitlab-ce-zh.svg)](http://microbadger.com/images/twang2218/gitlab-ce-zh) -[![Deploy to Docker Cloud](https://files.cloud.docker.com/images/deploy-to-dockercloud.svg)](https://cloud.docker.com/stack/deploy/?repo=https://github.com/twang2218/gitlab-ce-zh) +- [`9.2`, `9.2.10` (*9.2/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/9.2/Dockerfile) +- [`9.3`, `9.3.11` (*9.3/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/9.3/Dockerfile) +- [`9.4`, `9.4.6` (*9.4/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/9.4/Dockerfile) +- [`9.5`, `9.5.8` (*9.5/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/9.5/Dockerfile) +- [`10.0`, `10.0.3` (*10.0/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/10.0/Dockerfile) +- [`11.1`, `11.1.4` (*11.1/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/11.1/Dockerfile) +- [`11.11`, `11.11.8` (*11.11/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/11.11/Dockerfile) +- [`12.10`, `12.10.14` (*12.10/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/12.10/Dockerfile) +- [`13.3`, `13.3.6`, `latest` (*13.3/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/13.3/Dockerfile) +- [`testing` (*testing/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/testing/Dockerfile) + +[![Build Status](https://travis-ci.org/blueapple168/gitlab-ce-zh.svg?branch=master)](https://travis-ci.org/blueapple168/gitlab-ce-zh) +[![Image Layers and Size](https://images.microbadger.com/badges/image/blueapple/gitlab-ce-zh.svg)](http://microbadger.com/images/blueapple/gitlab-ce-zh) +[![Deploy to Docker Cloud](https://files.cloud.docker.com/images/deploy-to-dockercloud.svg)](https://cloud.docker.com/stack/deploy/?repo=https://github.com/blueapple168/gitlab-ce-zh) # GitLab 中文社区版 @@ -27,7 +31,7 @@ 如果想简单的运行一下看看,可以执行这个命令: ```bash -docker run -d -p 3000:80 twang2218/gitlab-ce-zh:10.0.3 +docker run -d -p 3000:80 blueapple/gitlab-ce-zh:10.0.3 ``` *可以将 `10.0.3` 换成你所需要的版本标签。* @@ -50,7 +54,7 @@ docker rm -fv <容器ID> version: '2' services: gitlab: - image: 'twang2218/gitlab-ce-zh:10.0.3' + image: 'blueapple/gitlab-ce-zh:10.0.3' restart: unless-stopped hostname: 'gitlab.example.com' environment: @@ -123,7 +127,7 @@ docker run -d \ -v gitlab-logs:/var/log/gitlab \ -v gitlab-data:/var/opt/gitlab \ --network gitlab-net \ - twang2218/gitlab-ce-zh:10.0.3 + blueapple/gitlab-ce-zh:10.0.3 ``` 如果需要进入容器修改配置文件,可以用 `docker exec` 命令进入容器: @@ -154,13 +158,13 @@ docker volume rm gitlab-config gitlab-datagitlab-logs * `testing` 是比较 [xhang 翻译项目](https://gitlab.com/xhang/gitlab) 的 `v10.0.3` 标签和 [`10-0-stable-zh` 分支](https://gitlab.com/xhang/gitlab/tree/10-0-stable-zh) 的差异生成汉化补丁,并基于官方镜像 `gitlab/gitlab-ce:10.0.3-ce.0` 应用汉化结果进行构建的。 -测试镜像将会在所对应分支发生改变后数分钟内开始构建镜像,构建成功后,会推送到 [Docker Hub 网站](https://hub.docker.com/r/twang2218/gitlab-ce-zh/),以方便测试,可以随时关注最新的[镜像标签列表](https://hub.docker.com/r/twang2218/gitlab-ce-zh/tags/)中所对应的构建时间。 +测试镜像将会在所对应分支发生改变后数分钟内开始构建镜像,构建成功后,会推送到 [Docker Hub 网站](https://hub.docker.com/r/blueapple/gitlab-ce-zh/),以方便测试,可以随时关注最新的[镜像标签列表](https://hub.docker.com/r/blueapple/gitlab-ce-zh/tags/)中所对应的构建时间。 运行测试镜像和运行其它镜像一样,可以用 `docker-compose` 的方法,也可以用之前最简命令的方法: ```bash -docker pull twang2218/gitlab-ce-zh:testing -docker run -d -p 3000:80 twang2218/gitlab-ce-zh:testing +docker pull blueapple/gitlab-ce-zh:testing +docker run -d -p 3000:80 blueapple/gitlab-ce-zh:testing ``` > 需要注意的是,这里的 `docker pull` 是必须的,因为测试镜像构建比较频繁,需要确保本地镜像是最新的镜像。如果是 `docker-compose`,则执行 `docker-compose pull` 来或取最新镜像。 @@ -221,7 +225,7 @@ docker run -d -p 3000:80 twang2218/gitlab-ce-zh:testing 例如: `./build.sh run 10.0.3` -这将会以命令 `docker run -d -P twang2218/gitlab-ce-zh:10.0.3` 来运行镜像。这里使用的是 `-P`,因此会随机映射端口。方便测试环境测试,避免和其它端口冲突。 +这将会以命令 `docker run -d -P blueapple/gitlab-ce-zh:10.0.3` 来运行镜像。这里使用的是 `-P`,因此会随机映射端口。方便测试环境测试,避免和其它端口冲突。 ```bash CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES From bc6933f44c37c5230efab138e5c66709abf5e8bd Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Thu, 1 Oct 2020 13:12:49 +0800 Subject: [PATCH 14/46] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=88=B012.3.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 12.3/Dockerfile | 105 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 12.3/Dockerfile diff --git a/12.3/Dockerfile b/12.3/Dockerfile new file mode 100644 index 0000000..87cce17 --- /dev/null +++ b/12.3/Dockerfile @@ -0,0 +1,105 @@ +##################### +# Building Stage # +##################### +FROM gitlab/gitlab-ce:12.3.5-ce.0 as builder + +ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails +ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git + +# Reference: +# * https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/config/software/gitlab-rails.rb +# * https://gitlab.com/gitlab-org/gitlab-ce/blob/master/.gitlab-ci.yml +RUN set -xe \ + && echo " # Preparing ..." \ + && export DEBIAN_FRONTEND=noninteractive \ + && export SSL_CERT_DIR=/etc/ssl/certs/ \ + && export GIT_SSL_CAPATH=/etc/ssl/certs/ \ + && curl -sL https://deb.nodesource.com/setup_8.x | bash - \ + && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ + && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ + && apt-get update \ + && apt-get install -yqq lsb-release patch nodejs python build-essential yarn cmake + +RUN set -xe \ + && echo " # Generating translation patch ..." \ + && cd /tmp \ + && git clone ${GITLAB_GIT_ZH} gitlab \ + && cd gitlab \ + && export IGNORE_DIRS=':!qa :!spec :!features :!.gitignore :!.gitlab :!locale :!app/assets/ :!vendor/assets/' \ + && git diff --diff-filter=d v12.3.5..v12.3.5-zh -- . ${IGNORE_DIRS} > ../zh_CN.diff \ + && echo " # Patching ..." \ + && patch -d ${GITLAB_DIR} -p1 < ../zh_CN.diff \ + && echo " # Copy assets files ..." \ + && git checkout v12.3.5-zh \ + && cp -R locale ${GITLAB_DIR}/ \ + && mkdir -p ${GITLAB_DIR}/app \ + && cp -R app/assets ${GITLAB_DIR}/app/ \ + && mkdir -p ${GITLAB_DIR}/vendor \ + && cp -R vendor/assets ${GITLAB_DIR}/vendor/ + +RUN set -xe \ + && echo " # Regenerating the assets" \ + && cd ${GITLAB_DIR} \ + && cp config/gitlab.yml.example config/gitlab.yml \ + && cp config/database.yml.postgresql config/database.yml \ + && cp config/secrets.yml.example config/secrets.yml \ + && rm -rf public/assets \ + && export NODE_ENV=production \ + && export RAILS_ENV=production \ + && export SETUP_DB=false \ + && export USE_DB=false \ + && export SKIP_STORAGE_VALIDATION=true \ + && export WEBPACK_REPORT=true \ + && export NO_COMPRESSION=true \ + && export NO_PRIVILEGE_DROP=true \ + && export NODE_OPTIONS=--max-old-space-size=4086 \ + && yarn install --frozen-lockfile \ + && bin/bundle install --frozen \ + && bin/rake gettext:compile \ + && bin/rake gitlab:assets:compile + +RUN set -xe \ + && echo " # Cleaning ..." \ + && yarn cache clean \ + && rm -rf log \ + tmp \ + config/gitlab.yml \ + config/database.yml \ + config/secrets.yml \ + .secret \ + .gitlab_shell_secret \ + .gitlab_workhorse_secret \ + app/assets \ + node_modules \ + && find /usr/lib/ -name __pycache__ | xargs rm -rf \ + && rm -rf /tmp/gitlab /tmp/*.diff /root/.cache /var/lib/apt/lists/* + + +###################### +# Production Stage # +###################### +FROM gitlab/gitlab-ce:12.3.5-ce.0 as production + +RUN set -xe \ + && export DEBIAN_FRONTEND=noninteractive \ + && apt-get update \ + && apt-get install -yqq locales tzdata \ + && locale-gen en_US.UTF-8 \ + && rm -rf /var/lib/apt/lists/* + +ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 +ENV TZ=Asia/Shanghai + +ENV GITLAB_VERSION=v12.3.5 +ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails +ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git +ENV GITLAB_GIT_COMMIT_UPSTREAM=v12.3.5 +ENV GITLAB_GIT_COMMIT_ZH=v12.3.5-zh + +COPY --from=builder ${GITLAB_DIR}/app ${GITLAB_DIR}/app +COPY --from=builder ${GITLAB_DIR}/public ${GITLAB_DIR}/public +COPY --from=builder ${GITLAB_DIR}/config/application.rb ${GITLAB_DIR}/config/application.rb +COPY --from=builder ${GITLAB_DIR}/config/initializers ${GITLAB_DIR}/config/initializers +COPY --from=builder ${GITLAB_DIR}/config/locales ${GITLAB_DIR}/config/locales +COPY --from=builder ${GITLAB_DIR}/lib/gitlab ${GITLAB_DIR}/lib/gitlab +COPY --from=builder ${GITLAB_DIR}/locale ${GITLAB_DIR}/locale From f223c25cc3635ef44c75d51324301bc34f796ed1 Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Thu, 1 Oct 2020 13:16:55 +0800 Subject: [PATCH 15/46] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=88=B011.11.7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 11.11/Dockerfile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/11.11/Dockerfile b/11.11/Dockerfile index f6facb1..cd1f999 100644 --- a/11.11/Dockerfile +++ b/11.11/Dockerfile @@ -1,7 +1,7 @@ ##################### # Building Stage # ##################### -FROM gitlab/gitlab-ce:11.11.8-ce.0 as builder +FROM gitlab/gitlab-ce:11.11.7-ce.0 as builder ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git @@ -26,11 +26,11 @@ RUN set -xe \ && git clone ${GITLAB_GIT_ZH} gitlab \ && cd gitlab \ && export IGNORE_DIRS=':!qa :!spec :!features :!.gitignore :!.gitlab :!locale :!app/assets/ :!vendor/assets/' \ - && git diff --diff-filter=d v11.11.8..v11.11.8-zh -- . ${IGNORE_DIRS} > ../zh_CN.diff \ + && git diff --diff-filter=d v11.11.7..v11.11.7-zh -- . ${IGNORE_DIRS} > ../zh_CN.diff \ && echo " # Patching ..." \ && patch -d ${GITLAB_DIR} -p1 < ../zh_CN.diff \ && echo " # Copy assets files ..." \ - && git checkout v11.11.8-zh \ + && git checkout v11.11.7-zh \ && cp -R locale ${GITLAB_DIR}/ \ && mkdir -p ${GITLAB_DIR}/app \ && cp -R app/assets ${GITLAB_DIR}/app/ \ @@ -78,7 +78,7 @@ RUN set -xe \ ###################### # Production Stage # ###################### -FROM gitlab/gitlab-ce:11.11.8-ce.0 as production +FROM gitlab/gitlab-ce:11.11.7-ce.0 as production RUN set -xe \ && export DEBIAN_FRONTEND=noninteractive \ @@ -90,11 +90,11 @@ RUN set -xe \ ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 ENV TZ=Asia/Shanghai -ENV GITLAB_VERSION=v11.11.8 +ENV GITLAB_VERSION=v11.11.7 ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git -ENV GITLAB_GIT_COMMIT_UPSTREAM=v11.11.8 -ENV GITLAB_GIT_COMMIT_ZH=v11.11.8-zh +ENV GITLAB_GIT_COMMIT_UPSTREAM=v11.11.7 +ENV GITLAB_GIT_COMMIT_ZH=v11.11.7-zh COPY --from=builder ${GITLAB_DIR}/app ${GITLAB_DIR}/app COPY --from=builder ${GITLAB_DIR}/public ${GITLAB_DIR}/public From cffdaccc7b552dbb839119e8d4fa909fb1aa7298 Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Thu, 1 Oct 2020 13:17:32 +0800 Subject: [PATCH 16/46] Delete Dockerfile --- 13.3/Dockerfile | 105 ------------------------------------------------ 1 file changed, 105 deletions(-) delete mode 100644 13.3/Dockerfile diff --git a/13.3/Dockerfile b/13.3/Dockerfile deleted file mode 100644 index 7faf4ac..0000000 --- a/13.3/Dockerfile +++ /dev/null @@ -1,105 +0,0 @@ -##################### -# Building Stage # -##################### -FROM gitlab/gitlab-ce:13.3.6-ce.0 as builder - -ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails -ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git - -# Reference: -# * https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/config/software/gitlab-rails.rb -# * https://gitlab.com/gitlab-org/gitlab-ce/blob/master/.gitlab-ci.yml -RUN set -xe \ - && echo " # Preparing ..." \ - && export DEBIAN_FRONTEND=noninteractive \ - && export SSL_CERT_DIR=/etc/ssl/certs/ \ - && export GIT_SSL_CAPATH=/etc/ssl/certs/ \ - && curl -sL https://deb.nodesource.com/setup_8.x | bash - \ - && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ - && apt-get update \ - && apt-get install -yqq lsb-release patch nodejs python build-essential yarn cmake - -RUN set -xe \ - && echo " # Generating translation patch ..." \ - && cd /tmp \ - && git clone ${GITLAB_GIT_ZH} gitlab \ - && cd gitlab \ - && export IGNORE_DIRS=':!qa :!spec :!features :!.gitignore :!.gitlab :!locale :!app/assets/ :!vendor/assets/' \ - && git diff --diff-filter=d v13.3.6..v13.3.6-zh -- . ${IGNORE_DIRS} > ../zh_CN.diff \ - && echo " # Patching ..." \ - && patch -d ${GITLAB_DIR} -p1 < ../zh_CN.diff \ - && echo " # Copy assets files ..." \ - && git checkout v13.3.6-zh \ - && cp -R locale ${GITLAB_DIR}/ \ - && mkdir -p ${GITLAB_DIR}/app \ - && cp -R app/assets ${GITLAB_DIR}/app/ \ - && mkdir -p ${GITLAB_DIR}/vendor \ - && cp -R vendor/assets ${GITLAB_DIR}/vendor/ - -RUN set -xe \ - && echo " # Regenerating the assets" \ - && cd ${GITLAB_DIR} \ - && cp config/gitlab.yml.example config/gitlab.yml \ - && cp config/database.yml.postgresql config/database.yml \ - && cp config/secrets.yml.example config/secrets.yml \ - && rm -rf public/assets \ - && export NODE_ENV=production \ - && export RAILS_ENV=production \ - && export SETUP_DB=false \ - && export USE_DB=false \ - && export SKIP_STORAGE_VALIDATION=true \ - && export WEBPACK_REPORT=true \ - && export NO_COMPRESSION=true \ - && export NO_PRIVILEGE_DROP=true \ - && export NODE_OPTIONS=--max-old-space-size=4086 \ - && yarn install --frozen-lockfile \ - && bin/bundle install --frozen \ - && bin/rake gettext:compile \ - && bin/rake gitlab:assets:compile - -RUN set -xe \ - && echo " # Cleaning ..." \ - && yarn cache clean \ - && rm -rf log \ - tmp \ - config/gitlab.yml \ - config/database.yml \ - config/secrets.yml \ - .secret \ - .gitlab_shell_secret \ - .gitlab_workhorse_secret \ - app/assets \ - node_modules \ - && find /usr/lib/ -name __pycache__ | xargs rm -rf \ - && rm -rf /tmp/gitlab /tmp/*.diff /root/.cache /var/lib/apt/lists/* - - -###################### -# Production Stage # -###################### -FROM gitlab/gitlab-ce:13.3.6-ce.0 as production - -RUN set -xe \ - && export DEBIAN_FRONTEND=noninteractive \ - && apt-get update \ - && apt-get install -yqq locales tzdata \ - && locale-gen en_US.UTF-8 \ - && rm -rf /var/lib/apt/lists/* - -ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 -ENV TZ=Asia/Shanghai - -ENV GITLAB_VERSION=v13.3.6 -ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails -ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git -ENV GITLAB_GIT_COMMIT_UPSTREAM=v13.3.6 -ENV GITLAB_GIT_COMMIT_ZH=v13.3.6-zh - -COPY --from=builder ${GITLAB_DIR}/app ${GITLAB_DIR}/app -COPY --from=builder ${GITLAB_DIR}/public ${GITLAB_DIR}/public -COPY --from=builder ${GITLAB_DIR}/config/application.rb ${GITLAB_DIR}/config/application.rb -COPY --from=builder ${GITLAB_DIR}/config/initializers ${GITLAB_DIR}/config/initializers -COPY --from=builder ${GITLAB_DIR}/config/locales ${GITLAB_DIR}/config/locales -COPY --from=builder ${GITLAB_DIR}/lib/gitlab ${GITLAB_DIR}/lib/gitlab -COPY --from=builder ${GITLAB_DIR}/locale ${GITLAB_DIR}/locale From 7a83b59cdb3bc4487c9d66d1bcd14a6388a2e870 Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Thu, 1 Oct 2020 13:18:00 +0800 Subject: [PATCH 17/46] Delete Dockerfile --- 12.10/Dockerfile | 105 ----------------------------------------------- 1 file changed, 105 deletions(-) delete mode 100644 12.10/Dockerfile diff --git a/12.10/Dockerfile b/12.10/Dockerfile deleted file mode 100644 index ff87da2..0000000 --- a/12.10/Dockerfile +++ /dev/null @@ -1,105 +0,0 @@ -##################### -# Building Stage # -##################### -FROM gitlab/gitlab-ce:12.10.14-ce.0 as builder - -ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails -ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git - -# Reference: -# * https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/config/software/gitlab-rails.rb -# * https://gitlab.com/gitlab-org/gitlab-ce/blob/master/.gitlab-ci.yml -RUN set -xe \ - && echo " # Preparing ..." \ - && export DEBIAN_FRONTEND=noninteractive \ - && export SSL_CERT_DIR=/etc/ssl/certs/ \ - && export GIT_SSL_CAPATH=/etc/ssl/certs/ \ - && curl -sL https://deb.nodesource.com/setup_8.x | bash - \ - && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ - && apt-get update \ - && apt-get install -yqq lsb-release patch nodejs python build-essential yarn cmake - -RUN set -xe \ - && echo " # Generating translation patch ..." \ - && cd /tmp \ - && git clone ${GITLAB_GIT_ZH} gitlab \ - && cd gitlab \ - && export IGNORE_DIRS=':!qa :!spec :!features :!.gitignore :!.gitlab :!locale :!app/assets/ :!vendor/assets/' \ - && git diff --diff-filter=d v12.10.14..v12.10.14-zh -- . ${IGNORE_DIRS} > ../zh_CN.diff \ - && echo " # Patching ..." \ - && patch -d ${GITLAB_DIR} -p1 < ../zh_CN.diff \ - && echo " # Copy assets files ..." \ - && git checkout v12.10.14-zh \ - && cp -R locale ${GITLAB_DIR}/ \ - && mkdir -p ${GITLAB_DIR}/app \ - && cp -R app/assets ${GITLAB_DIR}/app/ \ - && mkdir -p ${GITLAB_DIR}/vendor \ - && cp -R vendor/assets ${GITLAB_DIR}/vendor/ - -RUN set -xe \ - && echo " # Regenerating the assets" \ - && cd ${GITLAB_DIR} \ - && cp config/gitlab.yml.example config/gitlab.yml \ - && cp config/database.yml.postgresql config/database.yml \ - && cp config/secrets.yml.example config/secrets.yml \ - && rm -rf public/assets \ - && export NODE_ENV=production \ - && export RAILS_ENV=production \ - && export SETUP_DB=false \ - && export USE_DB=false \ - && export SKIP_STORAGE_VALIDATION=true \ - && export WEBPACK_REPORT=true \ - && export NO_COMPRESSION=true \ - && export NO_PRIVILEGE_DROP=true \ - && export NODE_OPTIONS=--max-old-space-size=4086 \ - && yarn install --frozen-lockfile \ - && bin/bundle install --frozen \ - && bin/rake gettext:compile \ - && bin/rake gitlab:assets:compile - -RUN set -xe \ - && echo " # Cleaning ..." \ - && yarn cache clean \ - && rm -rf log \ - tmp \ - config/gitlab.yml \ - config/database.yml \ - config/secrets.yml \ - .secret \ - .gitlab_shell_secret \ - .gitlab_workhorse_secret \ - app/assets \ - node_modules \ - && find /usr/lib/ -name __pycache__ | xargs rm -rf \ - && rm -rf /tmp/gitlab /tmp/*.diff /root/.cache /var/lib/apt/lists/* - - -###################### -# Production Stage # -###################### -FROM gitlab/gitlab-ce:12.10.14-ce.0 as production - -RUN set -xe \ - && export DEBIAN_FRONTEND=noninteractive \ - && apt-get update \ - && apt-get install -yqq locales tzdata \ - && locale-gen en_US.UTF-8 \ - && rm -rf /var/lib/apt/lists/* - -ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 -ENV TZ=Asia/Shanghai - -ENV GITLAB_VERSION=v12.10.14 -ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails -ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git -ENV GITLAB_GIT_COMMIT_UPSTREAM=v12.10.14 -ENV GITLAB_GIT_COMMIT_ZH=v12.10.14-zh - -COPY --from=builder ${GITLAB_DIR}/app ${GITLAB_DIR}/app -COPY --from=builder ${GITLAB_DIR}/public ${GITLAB_DIR}/public -COPY --from=builder ${GITLAB_DIR}/config/application.rb ${GITLAB_DIR}/config/application.rb -COPY --from=builder ${GITLAB_DIR}/config/initializers ${GITLAB_DIR}/config/initializers -COPY --from=builder ${GITLAB_DIR}/config/locales ${GITLAB_DIR}/config/locales -COPY --from=builder ${GITLAB_DIR}/lib/gitlab ${GITLAB_DIR}/lib/gitlab -COPY --from=builder ${GITLAB_DIR}/locale ${GITLAB_DIR}/locale From d7652088aa5be0a13c4d36f5b73c5188eb51f242 Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Thu, 1 Oct 2020 13:19:04 +0800 Subject: [PATCH 18/46] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=88=B012.3.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 12.3/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/12.3/Dockerfile b/12.3/Dockerfile index 87cce17..8ce8c23 100644 --- a/12.3/Dockerfile +++ b/12.3/Dockerfile @@ -1,5 +1,5 @@ ##################### -# Building Stage # +# Building Stages # ##################### FROM gitlab/gitlab-ce:12.3.5-ce.0 as builder From 450e060a426dc9676de085c6ccf8c2db112e6d2b Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Thu, 1 Oct 2020 13:22:26 +0800 Subject: [PATCH 19/46] Update README.md --- README.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 110a978..f39b0e0 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,8 @@ - [`9.5`, `9.5.8` (*9.5/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/9.5/Dockerfile) - [`10.0`, `10.0.3` (*10.0/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/10.0/Dockerfile) - [`11.1`, `11.1.4` (*11.1/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/11.1/Dockerfile) -- [`11.11`, `11.11.8` (*11.11/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/11.11/Dockerfile) -- [`12.10`, `12.10.14` (*12.10/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/12.10/Dockerfile) -- [`13.3`, `13.3.6`, `latest` (*13.3/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/13.3/Dockerfile) +- [`11.11`, `11.11.7` (*11.11/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/11.11/Dockerfile) +- [`12.3`, `12.3.5` (*12.10/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/12.3/Dockerfile) - [`testing` (*testing/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/testing/Dockerfile) [![Build Status](https://travis-ci.org/blueapple168/gitlab-ce-zh.svg?branch=master)](https://travis-ci.org/blueapple168/gitlab-ce-zh) @@ -31,7 +30,7 @@ 如果想简单的运行一下看看,可以执行这个命令: ```bash -docker run -d -p 3000:80 blueapple/gitlab-ce-zh:10.0.3 +docker run -d -p 3000:80 blueapple/gitlab-ce-zh:12.3.5 ``` *可以将 `10.0.3` 换成你所需要的版本标签。* @@ -54,7 +53,7 @@ docker rm -fv <容器ID> version: '2' services: gitlab: - image: 'blueapple/gitlab-ce-zh:10.0.3' + image: 'blueapple/gitlab-ce-zh:12.3.5' restart: unless-stopped hostname: 'gitlab.example.com' environment: @@ -127,7 +126,7 @@ docker run -d \ -v gitlab-logs:/var/log/gitlab \ -v gitlab-data:/var/opt/gitlab \ --network gitlab-net \ - blueapple/gitlab-ce-zh:10.0.3 + blueapple/gitlab-ce-zh:12.3.5 ``` 如果需要进入容器修改配置文件,可以用 `docker exec` 命令进入容器: From 7ad4fc3bd40c764e296d8b0797066e3c2cea3d12 Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Thu, 1 Oct 2020 14:23:34 +0800 Subject: [PATCH 20/46] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f39b0e0..2a22660 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ [![Build Status](https://travis-ci.org/blueapple168/gitlab-ce-zh.svg?branch=master)](https://travis-ci.org/blueapple168/gitlab-ce-zh) [![Image Layers and Size](https://images.microbadger.com/badges/image/blueapple/gitlab-ce-zh.svg)](http://microbadger.com/images/blueapple/gitlab-ce-zh) -[![Deploy to Docker Cloud](https://files.cloud.docker.com/images/deploy-to-dockercloud.svg)](https://cloud.docker.com/stack/deploy/?repo=https://github.com/blueapple168/gitlab-ce-zh) +[![Deploy to Docker Cloud](https://files.cloud.docker.com/images/deploy-to-dockercloud.svg)](https://cloud.docker.com/stack/deploy/?repo=https://github.com/blueapple/gitlab-ce-zh) # GitLab 中文社区版 From 0a5522fc950d07a8795b76d8f91555e1dde3b5e8 Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Thu, 1 Oct 2020 14:26:21 +0800 Subject: [PATCH 21/46] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2a22660..cfaa8ab 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ [![Build Status](https://travis-ci.org/blueapple168/gitlab-ce-zh.svg?branch=master)](https://travis-ci.org/blueapple168/gitlab-ce-zh) [![Image Layers and Size](https://images.microbadger.com/badges/image/blueapple/gitlab-ce-zh.svg)](http://microbadger.com/images/blueapple/gitlab-ce-zh) -[![Deploy to Docker Cloud](https://files.cloud.docker.com/images/deploy-to-dockercloud.svg)](https://cloud.docker.com/stack/deploy/?repo=https://github.com/blueapple/gitlab-ce-zh) + # GitLab 中文社区版 From a7cfd6e0db57db852f3e36d1c7f1fc8ee7a5a182 Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Thu, 1 Oct 2020 14:54:14 +0800 Subject: [PATCH 22/46] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=88=B012.0.9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 12.0/Dockerfile | 105 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 12.0/Dockerfile diff --git a/12.0/Dockerfile b/12.0/Dockerfile new file mode 100644 index 0000000..fb1b9c2 --- /dev/null +++ b/12.0/Dockerfile @@ -0,0 +1,105 @@ +##################### +# Building Stages # +##################### +FROM gitlab/gitlab-ce:12.0.9-ce.0 as builder + +ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails +ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git + +# Reference: +# * https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/config/software/gitlab-rails.rb +# * https://gitlab.com/gitlab-org/gitlab-ce/blob/master/.gitlab-ci.yml +RUN set -xe \ + && echo " # Preparing ..." \ + && export DEBIAN_FRONTEND=noninteractive \ + && export SSL_CERT_DIR=/etc/ssl/certs/ \ + && export GIT_SSL_CAPATH=/etc/ssl/certs/ \ + && curl -sL https://deb.nodesource.com/setup_8.x | bash - \ + && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ + && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ + && apt-get update \ + && apt-get install -yqq lsb-release patch nodejs python build-essential yarn cmake + +RUN set -xe \ + && echo " # Generating translation patch ..." \ + && cd /tmp \ + && git clone ${GITLAB_GIT_ZH} gitlab \ + && cd gitlab \ + && export IGNORE_DIRS=':!qa :!spec :!features :!.gitignore :!.gitlab :!locale :!app/assets/ :!vendor/assets/' \ + && git diff --diff-filter=d v12.0.9..v12.0.9-zh -- . ${IGNORE_DIRS} > ../zh_CN.diff \ + && echo " # Patching ..." \ + && patch -d ${GITLAB_DIR} -p1 < ../zh_CN.diff \ + && echo " # Copy assets files ..." \ + && git checkout v12.0.9-zh \ + && cp -R locale ${GITLAB_DIR}/ \ + && mkdir -p ${GITLAB_DIR}/app \ + && cp -R app/assets ${GITLAB_DIR}/app/ \ + && mkdir -p ${GITLAB_DIR}/vendor \ + && cp -R vendor/assets ${GITLAB_DIR}/vendor/ + +RUN set -xe \ + && echo " # Regenerating the assets" \ + && cd ${GITLAB_DIR} \ + && cp config/gitlab.yml.example config/gitlab.yml \ + && cp config/database.yml.postgresql config/database.yml \ + && cp config/secrets.yml.example config/secrets.yml \ + && rm -rf public/assets \ + && export NODE_ENV=production \ + && export RAILS_ENV=production \ + && export SETUP_DB=false \ + && export USE_DB=false \ + && export SKIP_STORAGE_VALIDATION=true \ + && export WEBPACK_REPORT=true \ + && export NO_COMPRESSION=true \ + && export NO_PRIVILEGE_DROP=true \ + && export NODE_OPTIONS=--max-old-space-size=4086 \ + && yarn install --frozen-lockfile \ + && bin/bundle install --frozen \ + && bin/rake gettext:compile \ + && bin/rake gitlab:assets:compile + +RUN set -xe \ + && echo " # Cleaning ..." \ + && yarn cache clean \ + && rm -rf log \ + tmp \ + config/gitlab.yml \ + config/database.yml \ + config/secrets.yml \ + .secret \ + .gitlab_shell_secret \ + .gitlab_workhorse_secret \ + app/assets \ + node_modules \ + && find /usr/lib/ -name __pycache__ | xargs rm -rf \ + && rm -rf /tmp/gitlab /tmp/*.diff /root/.cache /var/lib/apt/lists/* + + +###################### +# Production Stage # +###################### +FROM gitlab/gitlab-ce:12.0.9-ce.0 as production + +RUN set -xe \ + && export DEBIAN_FRONTEND=noninteractive \ + && apt-get update \ + && apt-get install -yqq locales tzdata \ + && locale-gen en_US.UTF-8 \ + && rm -rf /var/lib/apt/lists/* + +ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 +ENV TZ=Asia/Shanghai + +ENV GITLAB_VERSION=v12.0.9 +ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails +ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git +ENV GITLAB_GIT_COMMIT_UPSTREAM=v12.0.9 +ENV GITLAB_GIT_COMMIT_ZH=v12.0.9-zh + +COPY --from=builder ${GITLAB_DIR}/app ${GITLAB_DIR}/app +COPY --from=builder ${GITLAB_DIR}/public ${GITLAB_DIR}/public +COPY --from=builder ${GITLAB_DIR}/config/application.rb ${GITLAB_DIR}/config/application.rb +COPY --from=builder ${GITLAB_DIR}/config/initializers ${GITLAB_DIR}/config/initializers +COPY --from=builder ${GITLAB_DIR}/config/locales ${GITLAB_DIR}/config/locales +COPY --from=builder ${GITLAB_DIR}/lib/gitlab ${GITLAB_DIR}/lib/gitlab +COPY --from=builder ${GITLAB_DIR}/locale ${GITLAB_DIR}/locale From d17d4761fbfab0016efe9eccc8c178b3de21555a Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Thu, 1 Oct 2020 15:15:08 +0800 Subject: [PATCH 23/46] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=88=B012.1.14?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 12.1/Dockerfile | 105 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 12.1/Dockerfile diff --git a/12.1/Dockerfile b/12.1/Dockerfile new file mode 100644 index 0000000..3eab71b --- /dev/null +++ b/12.1/Dockerfile @@ -0,0 +1,105 @@ +##################### +# Building Stages # +##################### +FROM gitlab/gitlab-ce:12.1.14-ce.0 as builder + +ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails +ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git + +# Reference: +# * https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/config/software/gitlab-rails.rb +# * https://gitlab.com/gitlab-org/gitlab-ce/blob/master/.gitlab-ci.yml +RUN set -xe \ + && echo " # Preparing ..." \ + && export DEBIAN_FRONTEND=noninteractive \ + && export SSL_CERT_DIR=/etc/ssl/certs/ \ + && export GIT_SSL_CAPATH=/etc/ssl/certs/ \ + && curl -sL https://deb.nodesource.com/setup_8.x | bash - \ + && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ + && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ + && apt-get update \ + && apt-get install -yqq lsb-release patch nodejs python build-essential yarn cmake + +RUN set -xe \ + && echo " # Generating translation patch ..." \ + && cd /tmp \ + && git clone ${GITLAB_GIT_ZH} gitlab \ + && cd gitlab \ + && export IGNORE_DIRS=':!qa :!spec :!features :!.gitignore :!.gitlab :!locale :!app/assets/ :!vendor/assets/' \ + && git diff --diff-filter=d v12.1.14..v12.1.14-zh -- . ${IGNORE_DIRS} > ../zh_CN.diff \ + && echo " # Patching ..." \ + && patch -d ${GITLAB_DIR} -p1 < ../zh_CN.diff \ + && echo " # Copy assets files ..." \ + && git checkout v12.1.14-zh \ + && cp -R locale ${GITLAB_DIR}/ \ + && mkdir -p ${GITLAB_DIR}/app \ + && cp -R app/assets ${GITLAB_DIR}/app/ \ + && mkdir -p ${GITLAB_DIR}/vendor \ + && cp -R vendor/assets ${GITLAB_DIR}/vendor/ + +RUN set -xe \ + && echo " # Regenerating the assets" \ + && cd ${GITLAB_DIR} \ + && cp config/gitlab.yml.example config/gitlab.yml \ + && cp config/database.yml.postgresql config/database.yml \ + && cp config/secrets.yml.example config/secrets.yml \ + && rm -rf public/assets \ + && export NODE_ENV=production \ + && export RAILS_ENV=production \ + && export SETUP_DB=false \ + && export USE_DB=false \ + && export SKIP_STORAGE_VALIDATION=true \ + && export WEBPACK_REPORT=true \ + && export NO_COMPRESSION=true \ + && export NO_PRIVILEGE_DROP=true \ + && export NODE_OPTIONS=--max-old-space-size=4086 \ + && yarn install --frozen-lockfile \ + && bin/bundle install --frozen \ + && bin/rake gettext:compile \ + && bin/rake gitlab:assets:compile + +RUN set -xe \ + && echo " # Cleaning ..." \ + && yarn cache clean \ + && rm -rf log \ + tmp \ + config/gitlab.yml \ + config/database.yml \ + config/secrets.yml \ + .secret \ + .gitlab_shell_secret \ + .gitlab_workhorse_secret \ + app/assets \ + node_modules \ + && find /usr/lib/ -name __pycache__ | xargs rm -rf \ + && rm -rf /tmp/gitlab /tmp/*.diff /root/.cache /var/lib/apt/lists/* + + +###################### +# Production Stage # +###################### +FROM gitlab/gitlab-ce:12.1.14-ce.0 as production + +RUN set -xe \ + && export DEBIAN_FRONTEND=noninteractive \ + && apt-get update \ + && apt-get install -yqq locales tzdata \ + && locale-gen en_US.UTF-8 \ + && rm -rf /var/lib/apt/lists/* + +ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 +ENV TZ=Asia/Shanghai + +ENV GITLAB_VERSION=v12.1.14 +ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails +ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git +ENV GITLAB_GIT_COMMIT_UPSTREAM=v12.1.14 +ENV GITLAB_GIT_COMMIT_ZH=v12.1.14-zh + +COPY --from=builder ${GITLAB_DIR}/app ${GITLAB_DIR}/app +COPY --from=builder ${GITLAB_DIR}/public ${GITLAB_DIR}/public +COPY --from=builder ${GITLAB_DIR}/config/application.rb ${GITLAB_DIR}/config/application.rb +COPY --from=builder ${GITLAB_DIR}/config/initializers ${GITLAB_DIR}/config/initializers +COPY --from=builder ${GITLAB_DIR}/config/locales ${GITLAB_DIR}/config/locales +COPY --from=builder ${GITLAB_DIR}/lib/gitlab ${GITLAB_DIR}/lib/gitlab +COPY --from=builder ${GITLAB_DIR}/locale ${GITLAB_DIR}/locale From 5a1286d414e224b5a8ec9d2a1ccf76628d6841a9 Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Thu, 1 Oct 2020 15:21:13 +0800 Subject: [PATCH 24/46] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=88=B011.11.8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 11.11/Dockerfile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/11.11/Dockerfile b/11.11/Dockerfile index cd1f999..f6facb1 100644 --- a/11.11/Dockerfile +++ b/11.11/Dockerfile @@ -1,7 +1,7 @@ ##################### # Building Stage # ##################### -FROM gitlab/gitlab-ce:11.11.7-ce.0 as builder +FROM gitlab/gitlab-ce:11.11.8-ce.0 as builder ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git @@ -26,11 +26,11 @@ RUN set -xe \ && git clone ${GITLAB_GIT_ZH} gitlab \ && cd gitlab \ && export IGNORE_DIRS=':!qa :!spec :!features :!.gitignore :!.gitlab :!locale :!app/assets/ :!vendor/assets/' \ - && git diff --diff-filter=d v11.11.7..v11.11.7-zh -- . ${IGNORE_DIRS} > ../zh_CN.diff \ + && git diff --diff-filter=d v11.11.8..v11.11.8-zh -- . ${IGNORE_DIRS} > ../zh_CN.diff \ && echo " # Patching ..." \ && patch -d ${GITLAB_DIR} -p1 < ../zh_CN.diff \ && echo " # Copy assets files ..." \ - && git checkout v11.11.7-zh \ + && git checkout v11.11.8-zh \ && cp -R locale ${GITLAB_DIR}/ \ && mkdir -p ${GITLAB_DIR}/app \ && cp -R app/assets ${GITLAB_DIR}/app/ \ @@ -78,7 +78,7 @@ RUN set -xe \ ###################### # Production Stage # ###################### -FROM gitlab/gitlab-ce:11.11.7-ce.0 as production +FROM gitlab/gitlab-ce:11.11.8-ce.0 as production RUN set -xe \ && export DEBIAN_FRONTEND=noninteractive \ @@ -90,11 +90,11 @@ RUN set -xe \ ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 ENV TZ=Asia/Shanghai -ENV GITLAB_VERSION=v11.11.7 +ENV GITLAB_VERSION=v11.11.8 ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git -ENV GITLAB_GIT_COMMIT_UPSTREAM=v11.11.7 -ENV GITLAB_GIT_COMMIT_ZH=v11.11.7-zh +ENV GITLAB_GIT_COMMIT_UPSTREAM=v11.11.8 +ENV GITLAB_GIT_COMMIT_ZH=v11.11.8-zh COPY --from=builder ${GITLAB_DIR}/app ${GITLAB_DIR}/app COPY --from=builder ${GITLAB_DIR}/public ${GITLAB_DIR}/public From a119722cfbc23d8c11e8b165fd05e26cd0b0de39 Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Thu, 1 Oct 2020 15:32:32 +0800 Subject: [PATCH 25/46] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=88=B012.3.5,?= =?UTF-8?q?=E4=BD=BF=E7=94=A8gitee=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 12.3/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/12.3/Dockerfile b/12.3/Dockerfile index 8ce8c23..9451fc6 100644 --- a/12.3/Dockerfile +++ b/12.3/Dockerfile @@ -4,7 +4,7 @@ FROM gitlab/gitlab-ce:12.3.5-ce.0 as builder ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails -ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git +ENV GITLAB_GIT_ZH=https://gitee.com/webboyvc/gitlab.git # Reference: # * https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/config/software/gitlab-rails.rb @@ -92,7 +92,7 @@ ENV TZ=Asia/Shanghai ENV GITLAB_VERSION=v12.3.5 ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails -ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git +ENV GITLAB_GIT_ZH=https://gitee.com/webboyvc/gitlab.git ENV GITLAB_GIT_COMMIT_UPSTREAM=v12.3.5 ENV GITLAB_GIT_COMMIT_ZH=v12.3.5-zh From 893814d8a3529798649e23daca60fb0d80dd048d Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Thu, 1 Oct 2020 15:43:26 +0800 Subject: [PATCH 26/46] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cfaa8ab..1bcecf4 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,9 @@ - [`9.5`, `9.5.8` (*9.5/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/9.5/Dockerfile) - [`10.0`, `10.0.3` (*10.0/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/10.0/Dockerfile) - [`11.1`, `11.1.4` (*11.1/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/11.1/Dockerfile) -- [`11.11`, `11.11.7` (*11.11/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/11.11/Dockerfile) +- [`11.11`, `11.11.8` (*11.11/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/11.11/Dockerfile) +- [`12.0`, `12.0.9` (*12.0/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/12.0/Dockerfile) +- [`12.1`, `12.1.14` (*12.1/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/12.1/Dockerfile) - [`12.3`, `12.3.5` (*12.10/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/12.3/Dockerfile) - [`testing` (*testing/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/testing/Dockerfile) From 9e9029cd384e08b88fbf56627f9f4b64c54a79dd Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Thu, 1 Oct 2020 15:52:53 +0800 Subject: [PATCH 27/46] Delete Dockerfile --- 12.1/Dockerfile | 105 ------------------------------------------------ 1 file changed, 105 deletions(-) delete mode 100644 12.1/Dockerfile diff --git a/12.1/Dockerfile b/12.1/Dockerfile deleted file mode 100644 index 3eab71b..0000000 --- a/12.1/Dockerfile +++ /dev/null @@ -1,105 +0,0 @@ -##################### -# Building Stages # -##################### -FROM gitlab/gitlab-ce:12.1.14-ce.0 as builder - -ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails -ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git - -# Reference: -# * https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/config/software/gitlab-rails.rb -# * https://gitlab.com/gitlab-org/gitlab-ce/blob/master/.gitlab-ci.yml -RUN set -xe \ - && echo " # Preparing ..." \ - && export DEBIAN_FRONTEND=noninteractive \ - && export SSL_CERT_DIR=/etc/ssl/certs/ \ - && export GIT_SSL_CAPATH=/etc/ssl/certs/ \ - && curl -sL https://deb.nodesource.com/setup_8.x | bash - \ - && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ - && apt-get update \ - && apt-get install -yqq lsb-release patch nodejs python build-essential yarn cmake - -RUN set -xe \ - && echo " # Generating translation patch ..." \ - && cd /tmp \ - && git clone ${GITLAB_GIT_ZH} gitlab \ - && cd gitlab \ - && export IGNORE_DIRS=':!qa :!spec :!features :!.gitignore :!.gitlab :!locale :!app/assets/ :!vendor/assets/' \ - && git diff --diff-filter=d v12.1.14..v12.1.14-zh -- . ${IGNORE_DIRS} > ../zh_CN.diff \ - && echo " # Patching ..." \ - && patch -d ${GITLAB_DIR} -p1 < ../zh_CN.diff \ - && echo " # Copy assets files ..." \ - && git checkout v12.1.14-zh \ - && cp -R locale ${GITLAB_DIR}/ \ - && mkdir -p ${GITLAB_DIR}/app \ - && cp -R app/assets ${GITLAB_DIR}/app/ \ - && mkdir -p ${GITLAB_DIR}/vendor \ - && cp -R vendor/assets ${GITLAB_DIR}/vendor/ - -RUN set -xe \ - && echo " # Regenerating the assets" \ - && cd ${GITLAB_DIR} \ - && cp config/gitlab.yml.example config/gitlab.yml \ - && cp config/database.yml.postgresql config/database.yml \ - && cp config/secrets.yml.example config/secrets.yml \ - && rm -rf public/assets \ - && export NODE_ENV=production \ - && export RAILS_ENV=production \ - && export SETUP_DB=false \ - && export USE_DB=false \ - && export SKIP_STORAGE_VALIDATION=true \ - && export WEBPACK_REPORT=true \ - && export NO_COMPRESSION=true \ - && export NO_PRIVILEGE_DROP=true \ - && export NODE_OPTIONS=--max-old-space-size=4086 \ - && yarn install --frozen-lockfile \ - && bin/bundle install --frozen \ - && bin/rake gettext:compile \ - && bin/rake gitlab:assets:compile - -RUN set -xe \ - && echo " # Cleaning ..." \ - && yarn cache clean \ - && rm -rf log \ - tmp \ - config/gitlab.yml \ - config/database.yml \ - config/secrets.yml \ - .secret \ - .gitlab_shell_secret \ - .gitlab_workhorse_secret \ - app/assets \ - node_modules \ - && find /usr/lib/ -name __pycache__ | xargs rm -rf \ - && rm -rf /tmp/gitlab /tmp/*.diff /root/.cache /var/lib/apt/lists/* - - -###################### -# Production Stage # -###################### -FROM gitlab/gitlab-ce:12.1.14-ce.0 as production - -RUN set -xe \ - && export DEBIAN_FRONTEND=noninteractive \ - && apt-get update \ - && apt-get install -yqq locales tzdata \ - && locale-gen en_US.UTF-8 \ - && rm -rf /var/lib/apt/lists/* - -ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 -ENV TZ=Asia/Shanghai - -ENV GITLAB_VERSION=v12.1.14 -ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails -ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git -ENV GITLAB_GIT_COMMIT_UPSTREAM=v12.1.14 -ENV GITLAB_GIT_COMMIT_ZH=v12.1.14-zh - -COPY --from=builder ${GITLAB_DIR}/app ${GITLAB_DIR}/app -COPY --from=builder ${GITLAB_DIR}/public ${GITLAB_DIR}/public -COPY --from=builder ${GITLAB_DIR}/config/application.rb ${GITLAB_DIR}/config/application.rb -COPY --from=builder ${GITLAB_DIR}/config/initializers ${GITLAB_DIR}/config/initializers -COPY --from=builder ${GITLAB_DIR}/config/locales ${GITLAB_DIR}/config/locales -COPY --from=builder ${GITLAB_DIR}/lib/gitlab ${GITLAB_DIR}/lib/gitlab -COPY --from=builder ${GITLAB_DIR}/locale ${GITLAB_DIR}/locale From 36024918ec0dd29f54da233f2c5cd7f7394d1ba3 Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Thu, 1 Oct 2020 15:53:23 +0800 Subject: [PATCH 28/46] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 1bcecf4..23952fc 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,6 @@ - [`11.1`, `11.1.4` (*11.1/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/11.1/Dockerfile) - [`11.11`, `11.11.8` (*11.11/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/11.11/Dockerfile) - [`12.0`, `12.0.9` (*12.0/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/12.0/Dockerfile) -- [`12.1`, `12.1.14` (*12.1/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/12.1/Dockerfile) - [`12.3`, `12.3.5` (*12.10/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/12.3/Dockerfile) - [`testing` (*testing/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/testing/Dockerfile) From 32b2c978eddd9d0c762aab70ed76aff38c85b575 Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Thu, 1 Oct 2020 15:53:55 +0800 Subject: [PATCH 29/46] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 23952fc..3b444c9 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ - [`11.1`, `11.1.4` (*11.1/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/11.1/Dockerfile) - [`11.11`, `11.11.8` (*11.11/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/11.11/Dockerfile) - [`12.0`, `12.0.9` (*12.0/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/12.0/Dockerfile) -- [`12.3`, `12.3.5` (*12.10/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/12.3/Dockerfile) +- [`12.3`, `12.3.5` (*12.3/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/12.3/Dockerfile) - [`testing` (*testing/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/testing/Dockerfile) [![Build Status](https://travis-ci.org/blueapple168/gitlab-ce-zh.svg?branch=master)](https://travis-ci.org/blueapple168/gitlab-ce-zh) From 46255c65e7cd852c8d7fdbe73b1c0c17f2a9e17c Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Thu, 1 Oct 2020 16:04:38 +0800 Subject: [PATCH 30/46] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=88=B012.1.14?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 12.1/Dockerfile | 105 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 12.1/Dockerfile diff --git a/12.1/Dockerfile b/12.1/Dockerfile new file mode 100644 index 0000000..3ce7663 --- /dev/null +++ b/12.1/Dockerfile @@ -0,0 +1,105 @@ +##################### +# Building Stage # +##################### +FROM gitlab/gitlab-ce:12.1.14-ce.0 as builder + +ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails +ENV GITLAB_GIT_ZH=https://gitee.com/webboyvc/gitlab.git + +# Reference: +# * https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/config/software/gitlab-rails.rb +# * https://gitlab.com/gitlab-org/gitlab-ce/blob/master/.gitlab-ci.yml +RUN set -xe \ + && echo " # Preparing ..." \ + && export DEBIAN_FRONTEND=noninteractive \ + && export SSL_CERT_DIR=/etc/ssl/certs/ \ + && export GIT_SSL_CAPATH=/etc/ssl/certs/ \ + && curl -sL https://deb.nodesource.com/setup_8.x | bash - \ + && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ + && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ + && apt-get update \ + && apt-get install -yqq lsb-release patch nodejs python build-essential yarn cmake + +RUN set -xe \ + && echo " # Generating translation patch ..." \ + && cd /tmp \ + && git clone ${GITLAB_GIT_ZH} gitlab \ + && cd gitlab \ + && export IGNORE_DIRS=':!qa :!spec :!features :!.gitignore :!.gitlab :!locale :!app/assets/ :!vendor/assets/' \ + && git diff --diff-filter=d v12.1.14..v12.1.14-zh -- . ${IGNORE_DIRS} > ../zh_CN.diff \ + && echo " # Patching ..." \ + && patch -d ${GITLAB_DIR} -p1 < ../zh_CN.diff \ + && echo " # Copy assets files ..." \ + && git checkout v12.1.14-zh \ + && cp -R locale ${GITLAB_DIR}/ \ + && mkdir -p ${GITLAB_DIR}/app \ + && cp -R app/assets ${GITLAB_DIR}/app/ \ + && mkdir -p ${GITLAB_DIR}/vendor \ + && cp -R vendor/assets ${GITLAB_DIR}/vendor/ + +RUN set -xe \ + && echo " # Regenerating the assets" \ + && cd ${GITLAB_DIR} \ + && cp config/gitlab.yml.example config/gitlab.yml \ + && cp config/database.yml.postgresql config/database.yml \ + && cp config/secrets.yml.example config/secrets.yml \ + && rm -rf public/assets \ + && export NODE_ENV=production \ + && export RAILS_ENV=production \ + && export SETUP_DB=false \ + && export USE_DB=false \ + && export SKIP_STORAGE_VALIDATION=true \ + && export WEBPACK_REPORT=true \ + && export NO_COMPRESSION=true \ + && export NO_PRIVILEGE_DROP=true \ + && export NODE_OPTIONS=--max-old-space-size=4086 \ + && yarn install --frozen-lockfile \ + && bin/bundle install --frozen \ + && bin/rake gettext:compile \ + && bin/rake gitlab:assets:compile + +RUN set -xe \ + && echo " # Cleaning ..." \ + && yarn cache clean \ + && rm -rf log \ + tmp \ + config/gitlab.yml \ + config/database.yml \ + config/secrets.yml \ + .secret \ + .gitlab_shell_secret \ + .gitlab_workhorse_secret \ + app/assets \ + node_modules \ + && find /usr/lib/ -name __pycache__ | xargs rm -rf \ + && rm -rf /tmp/gitlab /tmp/*.diff /root/.cache /var/lib/apt/lists/* + + +###################### +# Production Stage # +###################### +FROM gitlab/gitlab-ce:12.1.14-ce.0 as production + +RUN set -xe \ + && export DEBIAN_FRONTEND=noninteractive \ + && apt-get update \ + && apt-get install -yqq locales tzdata \ + && locale-gen en_US.UTF-8 \ + && rm -rf /var/lib/apt/lists/* + +ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 +ENV TZ=Asia/Shanghai + +ENV GITLAB_VERSION=v12.1.14 +ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails +ENV GITLAB_GIT_ZH=https://gitee.com/webboyvc/gitlab.git +ENV GITLAB_GIT_COMMIT_UPSTREAM=v12.1.14 +ENV GITLAB_GIT_COMMIT_ZH=v12.1.14-zh + +COPY --from=builder ${GITLAB_DIR}/app ${GITLAB_DIR}/app +COPY --from=builder ${GITLAB_DIR}/public ${GITLAB_DIR}/public +COPY --from=builder ${GITLAB_DIR}/config/application.rb ${GITLAB_DIR}/config/application.rb +COPY --from=builder ${GITLAB_DIR}/config/initializers ${GITLAB_DIR}/config/initializers +COPY --from=builder ${GITLAB_DIR}/config/locales ${GITLAB_DIR}/config/locales +COPY --from=builder ${GITLAB_DIR}/lib/gitlab ${GITLAB_DIR}/lib/gitlab +COPY --from=builder ${GITLAB_DIR}/locale ${GITLAB_DIR}/locale From f634db8a00d522fa7b0daf9c8f288a0d61a97cb7 Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Sat, 3 Oct 2020 12:01:08 +0800 Subject: [PATCH 31/46] Update Dockerfile --- 12.3/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/12.3/Dockerfile b/12.3/Dockerfile index 9451fc6..87cce17 100644 --- a/12.3/Dockerfile +++ b/12.3/Dockerfile @@ -1,10 +1,10 @@ ##################### -# Building Stages # +# Building Stage # ##################### FROM gitlab/gitlab-ce:12.3.5-ce.0 as builder ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails -ENV GITLAB_GIT_ZH=https://gitee.com/webboyvc/gitlab.git +ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git # Reference: # * https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/config/software/gitlab-rails.rb @@ -92,7 +92,7 @@ ENV TZ=Asia/Shanghai ENV GITLAB_VERSION=v12.3.5 ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails -ENV GITLAB_GIT_ZH=https://gitee.com/webboyvc/gitlab.git +ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git ENV GITLAB_GIT_COMMIT_UPSTREAM=v12.3.5 ENV GITLAB_GIT_COMMIT_ZH=v12.3.5-zh From 06afc55ec81b1b7c26868b31ddd635195e7d0fd3 Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Sat, 3 Oct 2020 12:45:39 +0800 Subject: [PATCH 32/46] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=88=B012.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 12.1/Dockerfile | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/12.1/Dockerfile b/12.1/Dockerfile index 3ce7663..f686be5 100644 --- a/12.1/Dockerfile +++ b/12.1/Dockerfile @@ -1,14 +1,11 @@ ##################### # Building Stage # ##################### -FROM gitlab/gitlab-ce:12.1.14-ce.0 as builder +FROM gitlab/gitlab-ce:12.1.0-ce.0 as builder ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails -ENV GITLAB_GIT_ZH=https://gitee.com/webboyvc/gitlab.git +ENV GITLAB_GIT_ZH=https://gitlab.com/caeret/gitlab-ce.git -# Reference: -# * https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/config/software/gitlab-rails.rb -# * https://gitlab.com/gitlab-org/gitlab-ce/blob/master/.gitlab-ci.yml RUN set -xe \ && echo " # Preparing ..." \ && export DEBIAN_FRONTEND=noninteractive \ @@ -26,11 +23,11 @@ RUN set -xe \ && git clone ${GITLAB_GIT_ZH} gitlab \ && cd gitlab \ && export IGNORE_DIRS=':!qa :!spec :!features :!.gitignore :!.gitlab :!locale :!app/assets/ :!vendor/assets/' \ - && git diff --diff-filter=d v12.1.14..v12.1.14-zh -- . ${IGNORE_DIRS} > ../zh_CN.diff \ + && git diff --diff-filter=d v12.1.0..v12.1.0-zh -- . ${IGNORE_DIRS} > ../zh_CN.diff \ && echo " # Patching ..." \ && patch -d ${GITLAB_DIR} -p1 < ../zh_CN.diff \ && echo " # Copy assets files ..." \ - && git checkout v12.1.14-zh \ + && git checkout v12.1.0-zh \ && cp -R locale ${GITLAB_DIR}/ \ && mkdir -p ${GITLAB_DIR}/app \ && cp -R app/assets ${GITLAB_DIR}/app/ \ @@ -78,7 +75,7 @@ RUN set -xe \ ###################### # Production Stage # ###################### -FROM gitlab/gitlab-ce:12.1.14-ce.0 as production +FROM gitlab/gitlab-ce:12.1.0-ce.0 as production RUN set -xe \ && export DEBIAN_FRONTEND=noninteractive \ @@ -90,11 +87,11 @@ RUN set -xe \ ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 ENV TZ=Asia/Shanghai -ENV GITLAB_VERSION=v12.1.14 +ENV GITLAB_VERSION=v12.1.0 ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails -ENV GITLAB_GIT_ZH=https://gitee.com/webboyvc/gitlab.git -ENV GITLAB_GIT_COMMIT_UPSTREAM=v12.1.14 -ENV GITLAB_GIT_COMMIT_ZH=v12.1.14-zh +ENV GITLAB_GIT_ZH=https://gitlab.com/caeret/gitlab-ce.git +ENV GITLAB_GIT_COMMIT_UPSTREAM=v12.1.0 +ENV GITLAB_GIT_COMMIT_ZH=v12.1.0-zh COPY --from=builder ${GITLAB_DIR}/app ${GITLAB_DIR}/app COPY --from=builder ${GITLAB_DIR}/public ${GITLAB_DIR}/public From 7024e1ae5482ef88abccf59f544ea8300bb9bcf6 Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Sat, 3 Oct 2020 21:45:28 +0800 Subject: [PATCH 33/46] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=88=B012.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 12.1/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/12.1/Dockerfile b/12.1/Dockerfile index f686be5..5100ef8 100644 --- a/12.1/Dockerfile +++ b/12.1/Dockerfile @@ -4,7 +4,7 @@ FROM gitlab/gitlab-ce:12.1.0-ce.0 as builder ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails -ENV GITLAB_GIT_ZH=https://gitlab.com/caeret/gitlab-ce.git +ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git RUN set -xe \ && echo " # Preparing ..." \ @@ -89,7 +89,7 @@ ENV TZ=Asia/Shanghai ENV GITLAB_VERSION=v12.1.0 ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails -ENV GITLAB_GIT_ZH=https://gitlab.com/caeret/gitlab-ce.git +ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git ENV GITLAB_GIT_COMMIT_UPSTREAM=v12.1.0 ENV GITLAB_GIT_COMMIT_ZH=v12.1.0-zh From f23b710d9dc500d5a9b7cbd4930b1161410f7502 Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Sat, 3 Oct 2020 21:52:01 +0800 Subject: [PATCH 34/46] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=88=B012.2.8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 12.2/Dockerfile | 102 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 12.2/Dockerfile diff --git a/12.2/Dockerfile b/12.2/Dockerfile new file mode 100644 index 0000000..57899c1 --- /dev/null +++ b/12.2/Dockerfile @@ -0,0 +1,102 @@ +##################### +# Building Stage # +##################### +FROM gitlab/gitlab-ce:12.2.8-ce.0 as builder + +ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails +ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git + +RUN set -xe \ + && echo " # Preparing ..." \ + && export DEBIAN_FRONTEND=noninteractive \ + && export SSL_CERT_DIR=/etc/ssl/certs/ \ + && export GIT_SSL_CAPATH=/etc/ssl/certs/ \ + && curl -sL https://deb.nodesource.com/setup_8.x | bash - \ + && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ + && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ + && apt-get update \ + && apt-get install -yqq lsb-release patch nodejs python build-essential yarn cmake + +RUN set -xe \ + && echo " # Generating translation patch ..." \ + && cd /tmp \ + && git clone ${GITLAB_GIT_ZH} gitlab \ + && cd gitlab \ + && export IGNORE_DIRS=':!qa :!spec :!features :!.gitignore :!.gitlab :!locale :!app/assets/ :!vendor/assets/' \ + && git diff --diff-filter=d v12.2.8..v12.2.8-zh -- . ${IGNORE_DIRS} > ../zh_CN.diff \ + && echo " # Patching ..." \ + && patch -d ${GITLAB_DIR} -p1 < ../zh_CN.diff \ + && echo " # Copy assets files ..." \ + && git checkout v12.2.8-zh \ + && cp -R locale ${GITLAB_DIR}/ \ + && mkdir -p ${GITLAB_DIR}/app \ + && cp -R app/assets ${GITLAB_DIR}/app/ \ + && mkdir -p ${GITLAB_DIR}/vendor \ + && cp -R vendor/assets ${GITLAB_DIR}/vendor/ + +RUN set -xe \ + && echo " # Regenerating the assets" \ + && cd ${GITLAB_DIR} \ + && cp config/gitlab.yml.example config/gitlab.yml \ + && cp config/database.yml.postgresql config/database.yml \ + && cp config/secrets.yml.example config/secrets.yml \ + && rm -rf public/assets \ + && export NODE_ENV=production \ + && export RAILS_ENV=production \ + && export SETUP_DB=false \ + && export USE_DB=false \ + && export SKIP_STORAGE_VALIDATION=true \ + && export WEBPACK_REPORT=true \ + && export NO_COMPRESSION=true \ + && export NO_PRIVILEGE_DROP=true \ + && export NODE_OPTIONS=--max-old-space-size=4086 \ + && yarn install --frozen-lockfile \ + && bin/bundle install --frozen \ + && bin/rake gettext:compile \ + && bin/rake gitlab:assets:compile + +RUN set -xe \ + && echo " # Cleaning ..." \ + && yarn cache clean \ + && rm -rf log \ + tmp \ + config/gitlab.yml \ + config/database.yml \ + config/secrets.yml \ + .secret \ + .gitlab_shell_secret \ + .gitlab_workhorse_secret \ + app/assets \ + node_modules \ + && find /usr/lib/ -name __pycache__ | xargs rm -rf \ + && rm -rf /tmp/gitlab /tmp/*.diff /root/.cache /var/lib/apt/lists/* + + +###################### +# Production Stage # +###################### +FROM gitlab/gitlab-ce:12.2.8-ce.0 as production + +RUN set -xe \ + && export DEBIAN_FRONTEND=noninteractive \ + && apt-get update \ + && apt-get install -yqq locales tzdata \ + && locale-gen en_US.UTF-8 \ + && rm -rf /var/lib/apt/lists/* + +ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 +ENV TZ=Asia/Shanghai + +ENV GITLAB_VERSION=v12.2.8 +ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails +ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git +ENV GITLAB_GIT_COMMIT_UPSTREAM=v12.2.8 +ENV GITLAB_GIT_COMMIT_ZH=v12.2.8-zh + +COPY --from=builder ${GITLAB_DIR}/app ${GITLAB_DIR}/app +COPY --from=builder ${GITLAB_DIR}/public ${GITLAB_DIR}/public +COPY --from=builder ${GITLAB_DIR}/config/application.rb ${GITLAB_DIR}/config/application.rb +COPY --from=builder ${GITLAB_DIR}/config/initializers ${GITLAB_DIR}/config/initializers +COPY --from=builder ${GITLAB_DIR}/config/locales ${GITLAB_DIR}/config/locales +COPY --from=builder ${GITLAB_DIR}/lib/gitlab ${GITLAB_DIR}/lib/gitlab +COPY --from=builder ${GITLAB_DIR}/locale ${GITLAB_DIR}/locale From 1fcf8307919476d49dea9d46b8ddd370a1c2bd52 Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Sat, 3 Oct 2020 23:09:47 +0800 Subject: [PATCH 35/46] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=88=B012.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 12.1/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/12.1/Dockerfile b/12.1/Dockerfile index 5100ef8..f686be5 100644 --- a/12.1/Dockerfile +++ b/12.1/Dockerfile @@ -4,7 +4,7 @@ FROM gitlab/gitlab-ce:12.1.0-ce.0 as builder ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails -ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git +ENV GITLAB_GIT_ZH=https://gitlab.com/caeret/gitlab-ce.git RUN set -xe \ && echo " # Preparing ..." \ @@ -89,7 +89,7 @@ ENV TZ=Asia/Shanghai ENV GITLAB_VERSION=v12.1.0 ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails -ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git +ENV GITLAB_GIT_ZH=https://gitlab.com/caeret/gitlab-ce.git ENV GITLAB_GIT_COMMIT_UPSTREAM=v12.1.0 ENV GITLAB_GIT_COMMIT_ZH=v12.1.0-zh From 751cc5ac46a7a753e12b5f007174995e7a93888f Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Thu, 8 Oct 2020 12:03:45 +0800 Subject: [PATCH 36/46] =?UTF-8?q?=E6=B7=BB=E5=8A=A012.1.0=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3b444c9..a4ec584 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ - [`11.1`, `11.1.4` (*11.1/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/11.1/Dockerfile) - [`11.11`, `11.11.8` (*11.11/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/11.11/Dockerfile) - [`12.0`, `12.0.9` (*12.0/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/12.0/Dockerfile) +- [`12.1`, `12.1.0` (*12.1/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/12.1/Dockerfile) - [`12.3`, `12.3.5` (*12.3/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/12.3/Dockerfile) - [`testing` (*testing/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/testing/Dockerfile) @@ -31,7 +32,7 @@ 如果想简单的运行一下看看,可以执行这个命令: ```bash -docker run -d -p 3000:80 blueapple/gitlab-ce-zh:12.3.5 +docker run -d -p 3000:80 blueapple/gitlab-ce-zh:12.1.0 ``` *可以将 `10.0.3` 换成你所需要的版本标签。* @@ -54,7 +55,7 @@ docker rm -fv <容器ID> version: '2' services: gitlab: - image: 'blueapple/gitlab-ce-zh:12.3.5' + image: 'blueapple/gitlab-ce-zh:12.1.0' restart: unless-stopped hostname: 'gitlab.example.com' environment: @@ -127,7 +128,7 @@ docker run -d \ -v gitlab-logs:/var/log/gitlab \ -v gitlab-data:/var/opt/gitlab \ --network gitlab-net \ - blueapple/gitlab-ce-zh:12.3.5 + blueapple/gitlab-ce-zh:12.1.0 ``` 如果需要进入容器修改配置文件,可以用 `docker exec` 命令进入容器: From 389e7cad4f603525262ded10be3f7687598850c1 Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Thu, 8 Oct 2020 12:42:08 +0800 Subject: [PATCH 37/46] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=88=B012.3.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 12.3/Dockerfile | 90 +++---------------------------------------------- 1 file changed, 5 insertions(+), 85 deletions(-) diff --git a/12.3/Dockerfile b/12.3/Dockerfile index 87cce17..9cf0c3e 100644 --- a/12.3/Dockerfile +++ b/12.3/Dockerfile @@ -1,80 +1,3 @@ -##################### -# Building Stage # -##################### -FROM gitlab/gitlab-ce:12.3.5-ce.0 as builder - -ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails -ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git - -# Reference: -# * https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/config/software/gitlab-rails.rb -# * https://gitlab.com/gitlab-org/gitlab-ce/blob/master/.gitlab-ci.yml -RUN set -xe \ - && echo " # Preparing ..." \ - && export DEBIAN_FRONTEND=noninteractive \ - && export SSL_CERT_DIR=/etc/ssl/certs/ \ - && export GIT_SSL_CAPATH=/etc/ssl/certs/ \ - && curl -sL https://deb.nodesource.com/setup_8.x | bash - \ - && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ - && apt-get update \ - && apt-get install -yqq lsb-release patch nodejs python build-essential yarn cmake - -RUN set -xe \ - && echo " # Generating translation patch ..." \ - && cd /tmp \ - && git clone ${GITLAB_GIT_ZH} gitlab \ - && cd gitlab \ - && export IGNORE_DIRS=':!qa :!spec :!features :!.gitignore :!.gitlab :!locale :!app/assets/ :!vendor/assets/' \ - && git diff --diff-filter=d v12.3.5..v12.3.5-zh -- . ${IGNORE_DIRS} > ../zh_CN.diff \ - && echo " # Patching ..." \ - && patch -d ${GITLAB_DIR} -p1 < ../zh_CN.diff \ - && echo " # Copy assets files ..." \ - && git checkout v12.3.5-zh \ - && cp -R locale ${GITLAB_DIR}/ \ - && mkdir -p ${GITLAB_DIR}/app \ - && cp -R app/assets ${GITLAB_DIR}/app/ \ - && mkdir -p ${GITLAB_DIR}/vendor \ - && cp -R vendor/assets ${GITLAB_DIR}/vendor/ - -RUN set -xe \ - && echo " # Regenerating the assets" \ - && cd ${GITLAB_DIR} \ - && cp config/gitlab.yml.example config/gitlab.yml \ - && cp config/database.yml.postgresql config/database.yml \ - && cp config/secrets.yml.example config/secrets.yml \ - && rm -rf public/assets \ - && export NODE_ENV=production \ - && export RAILS_ENV=production \ - && export SETUP_DB=false \ - && export USE_DB=false \ - && export SKIP_STORAGE_VALIDATION=true \ - && export WEBPACK_REPORT=true \ - && export NO_COMPRESSION=true \ - && export NO_PRIVILEGE_DROP=true \ - && export NODE_OPTIONS=--max-old-space-size=4086 \ - && yarn install --frozen-lockfile \ - && bin/bundle install --frozen \ - && bin/rake gettext:compile \ - && bin/rake gitlab:assets:compile - -RUN set -xe \ - && echo " # Cleaning ..." \ - && yarn cache clean \ - && rm -rf log \ - tmp \ - config/gitlab.yml \ - config/database.yml \ - config/secrets.yml \ - .secret \ - .gitlab_shell_secret \ - .gitlab_workhorse_secret \ - app/assets \ - node_modules \ - && find /usr/lib/ -name __pycache__ | xargs rm -rf \ - && rm -rf /tmp/gitlab /tmp/*.diff /root/.cache /var/lib/apt/lists/* - - ###################### # Production Stage # ###################### @@ -85,7 +8,10 @@ RUN set -xe \ && apt-get update \ && apt-get install -yqq locales tzdata \ && locale-gen en_US.UTF-8 \ - && rm -rf /var/lib/apt/lists/* + && rm -rf /var/lib/apt/lists/* \ + && wget -c -O /tmp/gitlab-v12.3.5-zh.tar.gz https://gitlab.com/xhang/gitlab/-/archive/v12.3.5-zh/gitlab-v12.3.5-zh.tar.gz \ + && cd /tmp \ + && tar xf gitlab-v12.3.5-zh.tar.gz ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 ENV TZ=Asia/Shanghai @@ -96,10 +22,4 @@ ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git ENV GITLAB_GIT_COMMIT_UPSTREAM=v12.3.5 ENV GITLAB_GIT_COMMIT_ZH=v12.3.5-zh -COPY --from=builder ${GITLAB_DIR}/app ${GITLAB_DIR}/app -COPY --from=builder ${GITLAB_DIR}/public ${GITLAB_DIR}/public -COPY --from=builder ${GITLAB_DIR}/config/application.rb ${GITLAB_DIR}/config/application.rb -COPY --from=builder ${GITLAB_DIR}/config/initializers ${GITLAB_DIR}/config/initializers -COPY --from=builder ${GITLAB_DIR}/config/locales ${GITLAB_DIR}/config/locales -COPY --from=builder ${GITLAB_DIR}/lib/gitlab ${GITLAB_DIR}/lib/gitlab -COPY --from=builder ${GITLAB_DIR}/locale ${GITLAB_DIR}/locale +RUN yes|cp -ar /tmp/gitlab-v12.3.5-zh/* ${GITLAB_DIR}/ From ce32260fe1e5c550836b5f52ef6cd1a9f488870e Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Thu, 8 Oct 2020 12:43:04 +0800 Subject: [PATCH 38/46] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=88=B012.3.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 12.3/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/12.3/Dockerfile b/12.3/Dockerfile index 9cf0c3e..e5e72fe 100644 --- a/12.3/Dockerfile +++ b/12.3/Dockerfile @@ -10,8 +10,7 @@ RUN set -xe \ && locale-gen en_US.UTF-8 \ && rm -rf /var/lib/apt/lists/* \ && wget -c -O /tmp/gitlab-v12.3.5-zh.tar.gz https://gitlab.com/xhang/gitlab/-/archive/v12.3.5-zh/gitlab-v12.3.5-zh.tar.gz \ - && cd /tmp \ - && tar xf gitlab-v12.3.5-zh.tar.gz + && tar xf /tmp/gitlab-v12.3.5-zh.tar.gz ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 ENV TZ=Asia/Shanghai From 935fe5225e3410895191cc87ebc896f1b4890e67 Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Thu, 8 Oct 2020 13:15:28 +0800 Subject: [PATCH 39/46] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=88=B012.3.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 12.3/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/12.3/Dockerfile b/12.3/Dockerfile index e5e72fe..f0c1bd8 100644 --- a/12.3/Dockerfile +++ b/12.3/Dockerfile @@ -10,6 +10,7 @@ RUN set -xe \ && locale-gen en_US.UTF-8 \ && rm -rf /var/lib/apt/lists/* \ && wget -c -O /tmp/gitlab-v12.3.5-zh.tar.gz https://gitlab.com/xhang/gitlab/-/archive/v12.3.5-zh/gitlab-v12.3.5-zh.tar.gz \ + && cd /tmp \ && tar xf /tmp/gitlab-v12.3.5-zh.tar.gz ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 @@ -21,4 +22,6 @@ ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git ENV GITLAB_GIT_COMMIT_UPSTREAM=v12.3.5 ENV GITLAB_GIT_COMMIT_ZH=v12.3.5-zh -RUN yes|cp -ar /tmp/gitlab-v12.3.5-zh/* ${GITLAB_DIR}/ +RUN yes|cp -ar /tmp/gitlab-v12.3.5-zh/* ${GITLAB_DIR}/ \ + && rm -rf /tmp/gitlab-v12.3.5-zh.tar.gz \ + /tmp/gitlab-v12.3.5-zh/ From b8015e68c994fd4a439965d6d465f1256a0a9cea Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Thu, 8 Oct 2020 13:16:15 +0800 Subject: [PATCH 40/46] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=88=B012.3.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 12.3/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/12.3/Dockerfile b/12.3/Dockerfile index f0c1bd8..22f9b58 100644 --- a/12.3/Dockerfile +++ b/12.3/Dockerfile @@ -23,5 +23,5 @@ ENV GITLAB_GIT_COMMIT_UPSTREAM=v12.3.5 ENV GITLAB_GIT_COMMIT_ZH=v12.3.5-zh RUN yes|cp -ar /tmp/gitlab-v12.3.5-zh/* ${GITLAB_DIR}/ \ - && rm -rf /tmp/gitlab-v12.3.5-zh.tar.gz \ + && rm -rf /tmp/gitlab-v12.3.5-zh.tar.gz \ /tmp/gitlab-v12.3.5-zh/ From 8debd97b59468d204022f50d6f0d84052d89ff87 Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Thu, 8 Oct 2020 13:48:32 +0800 Subject: [PATCH 41/46] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=88=B012.2.8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 12.2/Dockerfile | 109 ++++++++---------------------------------------- 1 file changed, 17 insertions(+), 92 deletions(-) diff --git a/12.2/Dockerfile b/12.2/Dockerfile index 57899c1..2840c6c 100644 --- a/12.2/Dockerfile +++ b/12.2/Dockerfile @@ -1,102 +1,27 @@ -##################### -# Building Stage # -##################### -FROM gitlab/gitlab-ce:12.2.8-ce.0 as builder - -ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails -ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git - -RUN set -xe \ - && echo " # Preparing ..." \ - && export DEBIAN_FRONTEND=noninteractive \ - && export SSL_CERT_DIR=/etc/ssl/certs/ \ - && export GIT_SSL_CAPATH=/etc/ssl/certs/ \ - && curl -sL https://deb.nodesource.com/setup_8.x | bash - \ - && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ - && apt-get update \ - && apt-get install -yqq lsb-release patch nodejs python build-essential yarn cmake - -RUN set -xe \ - && echo " # Generating translation patch ..." \ - && cd /tmp \ - && git clone ${GITLAB_GIT_ZH} gitlab \ - && cd gitlab \ - && export IGNORE_DIRS=':!qa :!spec :!features :!.gitignore :!.gitlab :!locale :!app/assets/ :!vendor/assets/' \ - && git diff --diff-filter=d v12.2.8..v12.2.8-zh -- . ${IGNORE_DIRS} > ../zh_CN.diff \ - && echo " # Patching ..." \ - && patch -d ${GITLAB_DIR} -p1 < ../zh_CN.diff \ - && echo " # Copy assets files ..." \ - && git checkout v12.2.8-zh \ - && cp -R locale ${GITLAB_DIR}/ \ - && mkdir -p ${GITLAB_DIR}/app \ - && cp -R app/assets ${GITLAB_DIR}/app/ \ - && mkdir -p ${GITLAB_DIR}/vendor \ - && cp -R vendor/assets ${GITLAB_DIR}/vendor/ - -RUN set -xe \ - && echo " # Regenerating the assets" \ - && cd ${GITLAB_DIR} \ - && cp config/gitlab.yml.example config/gitlab.yml \ - && cp config/database.yml.postgresql config/database.yml \ - && cp config/secrets.yml.example config/secrets.yml \ - && rm -rf public/assets \ - && export NODE_ENV=production \ - && export RAILS_ENV=production \ - && export SETUP_DB=false \ - && export USE_DB=false \ - && export SKIP_STORAGE_VALIDATION=true \ - && export WEBPACK_REPORT=true \ - && export NO_COMPRESSION=true \ - && export NO_PRIVILEGE_DROP=true \ - && export NODE_OPTIONS=--max-old-space-size=4086 \ - && yarn install --frozen-lockfile \ - && bin/bundle install --frozen \ - && bin/rake gettext:compile \ - && bin/rake gitlab:assets:compile - -RUN set -xe \ - && echo " # Cleaning ..." \ - && yarn cache clean \ - && rm -rf log \ - tmp \ - config/gitlab.yml \ - config/database.yml \ - config/secrets.yml \ - .secret \ - .gitlab_shell_secret \ - .gitlab_workhorse_secret \ - app/assets \ - node_modules \ - && find /usr/lib/ -name __pycache__ | xargs rm -rf \ - && rm -rf /tmp/gitlab /tmp/*.diff /root/.cache /var/lib/apt/lists/* - - ###################### # Production Stage # ###################### -FROM gitlab/gitlab-ce:12.2.8-ce.0 as production - -RUN set -xe \ - && export DEBIAN_FRONTEND=noninteractive \ - && apt-get update \ - && apt-get install -yqq locales tzdata \ - && locale-gen en_US.UTF-8 \ - && rm -rf /var/lib/apt/lists/* - -ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 -ENV TZ=Asia/Shanghai +ARG GITLAB_CE_BASE_VERSION=12.2.8 +FROM gitlab/gitlab-ce:${GITLAB_CE_BASE_VERSION}-ce.0 AS production +MAINTAINER "blueapple " ENV GITLAB_VERSION=v12.2.8 ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git ENV GITLAB_GIT_COMMIT_UPSTREAM=v12.2.8 ENV GITLAB_GIT_COMMIT_ZH=v12.2.8-zh +ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 +ENV TZ=Asia/Shanghai + +RUN set -xe \ + && export DEBIAN_FRONTEND=noninteractive \ + && apt-get update \ + && apt-get install -yqq locales tzdata \ + && locale-gen en_US.UTF-8 \ + && rm -rf /var/lib/apt/lists/* \ + && wget -c -O /tmp/gitlab-${GITLAB_VERSION}-zh.tar.gz \ + https://gitlab.com/xhang/gitlab/-/archive/${GITLAB_VERSION}-zh/gitlab-${GITLAB_VERSION}-zh.tar.gz \ + && cd /tmp \ + && tar xf gitlab-${GITLAB_VERSION}-zh.tar.gz -COPY --from=builder ${GITLAB_DIR}/app ${GITLAB_DIR}/app -COPY --from=builder ${GITLAB_DIR}/public ${GITLAB_DIR}/public -COPY --from=builder ${GITLAB_DIR}/config/application.rb ${GITLAB_DIR}/config/application.rb -COPY --from=builder ${GITLAB_DIR}/config/initializers ${GITLAB_DIR}/config/initializers -COPY --from=builder ${GITLAB_DIR}/config/locales ${GITLAB_DIR}/config/locales -COPY --from=builder ${GITLAB_DIR}/lib/gitlab ${GITLAB_DIR}/lib/gitlab -COPY --from=builder ${GITLAB_DIR}/locale ${GITLAB_DIR}/locale +RUN yes|cp -ar /tmp/gitlab-${GITLAB_VERSION}-zh/* ${GITLAB_DIR}/ From bd38e448831b9202702843b0909b5b92115cbed6 Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Thu, 8 Oct 2020 21:11:08 +0800 Subject: [PATCH 42/46] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=88=B012.3.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a4ec584..7e96773 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +# twang2218的镜像不再更新,继续更新他的镜像,新版本12.2以后采用直接替换文件的方式进行汉化(无编译过程),最新版本支持到12.3.5 # 支持的 tags 和对应的 `Dockerfile` - [`9.2`, `9.2.10` (*9.2/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/9.2/Dockerfile) @@ -21,7 +22,7 @@ 这是汉化的 GitLab 社区版 Docker Image [twang2218/gitlab-ce-zh](https://hub.docker.com/r/twang2218/gitlab-ce-zh/),基于官方提供的 Docker Image [gitlab/gitlab-ce](https://hub.docker.com/r/gitlab/gitlab-ce/),以及 Larry Li 的汉化 (8.9以前的版本) 和谢航的汉化 (8.9 以后的版本) 而制作。 * 如果碰到汉化问题,欢迎到 来提交 Issue 甚至 Merge Request; -* 如果碰到镜像问题,欢迎到 来提交 Issue 或 Pull Request。 +* 如果碰到镜像问题,欢迎到 来提交 Issue 或 Pull Request。 大家的贡献才能让汉化项目变得更好。如果喜欢本项目,不要忘了加星标啊。 ☺ @@ -32,7 +33,7 @@ 如果想简单的运行一下看看,可以执行这个命令: ```bash -docker run -d -p 3000:80 blueapple/gitlab-ce-zh:12.1.0 +docker run -d -p 3000:80 blueapple/gitlab-ce-zh:12.3.5 ``` *可以将 `10.0.3` 换成你所需要的版本标签。* @@ -55,7 +56,7 @@ docker rm -fv <容器ID> version: '2' services: gitlab: - image: 'blueapple/gitlab-ce-zh:12.1.0' + image: 'blueapple/gitlab-ce-zh:12.3.5' restart: unless-stopped hostname: 'gitlab.example.com' environment: @@ -128,7 +129,7 @@ docker run -d \ -v gitlab-logs:/var/log/gitlab \ -v gitlab-data:/var/opt/gitlab \ --network gitlab-net \ - blueapple/gitlab-ce-zh:12.1.0 + blueapple/gitlab-ce-zh:12.3.5 ``` 如果需要进入容器修改配置文件,可以用 `docker exec` 命令进入容器: From e25cb61b2bd6cf81a3c9d48f72d81e1f1024386d Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Thu, 8 Oct 2020 21:23:23 +0800 Subject: [PATCH 43/46] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=88=B012.2.8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 12.2/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/12.2/Dockerfile b/12.2/Dockerfile index 2840c6c..80d9643 100644 --- a/12.2/Dockerfile +++ b/12.2/Dockerfile @@ -24,4 +24,6 @@ RUN set -xe \ && cd /tmp \ && tar xf gitlab-${GITLAB_VERSION}-zh.tar.gz -RUN yes|cp -ar /tmp/gitlab-${GITLAB_VERSION}-zh/* ${GITLAB_DIR}/ +RUN yes|cp -ar /tmp/gitlab-${GITLAB_VERSION}-zh/* ${GITLAB_DIR}/ \ + && rm -rf /tmp/gitlab-${GITLAB_VERSION}-zh.tar.gz \ + /tmp/gitlab-${GITLAB_VERSION}-zh/ From 5993e0f6c66d87d8129f8aaa9ee43c62da8730b1 Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Thu, 8 Oct 2020 21:24:19 +0800 Subject: [PATCH 44/46] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=88=B012.3.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 12.3/Dockerfile | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/12.3/Dockerfile b/12.3/Dockerfile index 22f9b58..626388f 100644 --- a/12.3/Dockerfile +++ b/12.3/Dockerfile @@ -1,7 +1,17 @@ ###################### # Production Stage # ###################### -FROM gitlab/gitlab-ce:12.3.5-ce.0 as production +ARG GITLAB_CE_BASE_VERSION=12.3.5 +FROM gitlab/gitlab-ce:${GITLAB_CE_BASE_VERSION}-ce.0 AS production +MAINTAINER "blueapple " + +ENV GITLAB_VERSION=v12.3.5 +ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails +ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git +ENV GITLAB_GIT_COMMIT_UPSTREAM=v12.3.5 +ENV GITLAB_GIT_COMMIT_ZH=v12.3.5-zh +ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 +ENV TZ=Asia/Shanghai RUN set -xe \ && export DEBIAN_FRONTEND=noninteractive \ @@ -9,19 +19,11 @@ RUN set -xe \ && apt-get install -yqq locales tzdata \ && locale-gen en_US.UTF-8 \ && rm -rf /var/lib/apt/lists/* \ - && wget -c -O /tmp/gitlab-v12.3.5-zh.tar.gz https://gitlab.com/xhang/gitlab/-/archive/v12.3.5-zh/gitlab-v12.3.5-zh.tar.gz \ + && wget -c -O /tmp/gitlab-${GITLAB_VERSION}-zh.tar.gz \ + https://gitlab.com/xhang/gitlab/-/archive/${GITLAB_VERSION}-zh/gitlab-${GITLAB_VERSION}-zh.tar.gz \ && cd /tmp \ - && tar xf /tmp/gitlab-v12.3.5-zh.tar.gz - -ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 -ENV TZ=Asia/Shanghai - -ENV GITLAB_VERSION=v12.3.5 -ENV GITLAB_DIR=/opt/gitlab/embedded/service/gitlab-rails -ENV GITLAB_GIT_ZH=https://gitlab.com/xhang/gitlab.git -ENV GITLAB_GIT_COMMIT_UPSTREAM=v12.3.5 -ENV GITLAB_GIT_COMMIT_ZH=v12.3.5-zh + && tar xf gitlab-${GITLAB_VERSION}-zh.tar.gz -RUN yes|cp -ar /tmp/gitlab-v12.3.5-zh/* ${GITLAB_DIR}/ \ - && rm -rf /tmp/gitlab-v12.3.5-zh.tar.gz \ - /tmp/gitlab-v12.3.5-zh/ +RUN yes|cp -ar /tmp/gitlab-${GITLAB_VERSION}-zh/* ${GITLAB_DIR}/ \ + && rm -rf /tmp/gitlab-${GITLAB_VERSION}-zh.tar.gz \ + /tmp/gitlab-${GITLAB_VERSION}-zh/ From 94464c68638dee339aa47ecbce31c3a8f29fe953 Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Thu, 8 Oct 2020 21:29:58 +0800 Subject: [PATCH 45/46] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=88=B012.3.5?= =?UTF-8?q?=EF=BC=8C=E5=86=99=E6=98=8E=E5=8D=87=E7=BA=A7=E6=AD=A5=E9=AA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7e96773..3d47e28 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -# twang2218的镜像不再更新,继续更新他的镜像,新版本12.2以后采用直接替换文件的方式进行汉化(无编译过程),最新版本支持到12.3.5 +## twang2218的镜像不再更新,继续更新他的镜像,新版本12.2以后采用直接替换文件的方式进行汉化(无编译过程),最新版本支持到12.3.5 +** 按照官方的说法,gitlab允许小版本直接升级,大版本需要阶段升级。 +** 跨版本升级示例:11.0.x -> 11.11.x -> 12.0.x -> 12.10.x -> 13.0.x # 支持的 tags 和对应的 `Dockerfile` - [`9.2`, `9.2.10` (*9.2/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/9.2/Dockerfile) From 4c282a00f4f4d03e3c90fb9da1c4dec196fbca5d Mon Sep 17 00:00:00 2001 From: blueapple168 Date: Thu, 8 Oct 2020 21:32:26 +0800 Subject: [PATCH 46/46] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=88=B012.3.5?= =?UTF-8?q?=EF=BC=8C=E5=86=99=E6=98=8E=E5=8D=87=E7=BA=A7=E6=AD=A5=E9=AA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3d47e28..0fd00c7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ -## twang2218的镜像不再更新,继续更新他的镜像,新版本12.2以后采用直接替换文件的方式进行汉化(无编译过程),最新版本支持到12.3.5 -** 按照官方的说法,gitlab允许小版本直接升级,大版本需要阶段升级。 -** 跨版本升级示例:11.0.x -> 11.11.x -> 12.0.x -> 12.10.x -> 13.0.x +- twang2218的镜像不再更新,继续更新他的镜像 +- 新版本12.2以后采用直接替换文件的方式进行汉化(无编译过程),最新版本支持到12.3.5 +- 按照官方的说法,gitlab允许小版本直接升级,大版本需要阶段升级。 +- 跨版本升级示例:11.0.x -> 11.11.x -> 12.0.x -> 12.10.x -> 13.0.x # 支持的 tags 和对应的 `Dockerfile` - [`9.2`, `9.2.10` (*9.2/Dockerfile*)](https://github.com/blueapple168/gitlab-ce-zh/blob/master/9.2/Dockerfile)