Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
10a9cdd
Create Dockerfile
blueapple168 Sep 16, 2020
b866d9d
Delete Dockerfile
blueapple168 Sep 16, 2020
f9f595d
Create 11.1
blueapple168 Sep 16, 2020
7a9712e
Delete 11.1
blueapple168 Sep 16, 2020
aaddd2e
Create Dockerfile
blueapple168 Sep 16, 2020
bf6910e
Update Dockerfile
blueapple168 Sep 16, 2020
f74e8c3
升级到11.1.4
blueapple168 Sep 16, 2020
39fb01d
升级到11.11.8
blueapple168 Sep 16, 2020
3a39b47
Delete 11.11
blueapple168 Sep 16, 2020
a15309a
升级到11.11.8
blueapple168 Sep 16, 2020
8f009b4
升级到12.10.14
blueapple168 Sep 16, 2020
64b8c2c
升级到13.3.6
blueapple168 Sep 16, 2020
79734f4
Update README.md
blueapple168 Sep 16, 2020
bc6933f
更新到12.3.5
blueapple168 Oct 1, 2020
f223c25
升级到11.11.7
blueapple168 Oct 1, 2020
cffdacc
Delete Dockerfile
blueapple168 Oct 1, 2020
7a83b59
Delete Dockerfile
blueapple168 Oct 1, 2020
d765208
升级到12.3.5
blueapple168 Oct 1, 2020
450e060
Update README.md
blueapple168 Oct 1, 2020
7ad4fc3
Update README.md
blueapple168 Oct 1, 2020
0a5522f
Update README.md
blueapple168 Oct 1, 2020
a7cfd6e
升级到12.0.9
blueapple168 Oct 1, 2020
d17d476
升级到12.1.14
blueapple168 Oct 1, 2020
5a1286d
升级到11.11.8
blueapple168 Oct 1, 2020
a119722
升级到12.3.5,使用gitee源
blueapple168 Oct 1, 2020
893814d
Update README.md
blueapple168 Oct 1, 2020
9e9029c
Delete Dockerfile
blueapple168 Oct 1, 2020
3602491
Update README.md
blueapple168 Oct 1, 2020
32b2c97
Update README.md
blueapple168 Oct 1, 2020
46255c6
升级到12.1.14
blueapple168 Oct 1, 2020
f634db8
Update Dockerfile
blueapple168 Oct 3, 2020
06afc55
升级到12.1.0
blueapple168 Oct 3, 2020
7024e1a
升级到12.1.0
blueapple168 Oct 3, 2020
f23b710
升级到12.2.8
blueapple168 Oct 3, 2020
1fcf830
升级到12.1.0
blueapple168 Oct 3, 2020
751cc5a
添加12.1.0版本
blueapple168 Oct 8, 2020
389e7ca
升级到12.3.5
blueapple168 Oct 8, 2020
ce32260
升级到12.3.5
blueapple168 Oct 8, 2020
935fe52
升级到12.3.5
blueapple168 Oct 8, 2020
b8015e6
升级到12.3.5
blueapple168 Oct 8, 2020
8debd97
升级到12.2.8
blueapple168 Oct 8, 2020
bd38e44
升级到12.3.5
blueapple168 Oct 8, 2020
e25cb61
升级到12.2.8
blueapple168 Oct 8, 2020
5993e0f
升级到12.3.5
blueapple168 Oct 8, 2020
94464c6
升级到12.3.5,写明升级步骤
blueapple168 Oct 8, 2020
4c282a0
升级到12.3.5,写明升级步骤
blueapple168 Oct 8, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 105 additions & 0 deletions 11.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
105 changes: 105 additions & 0 deletions 11.11/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
105 changes: 105 additions & 0 deletions 12.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Loading