mirror of
https://github.com/sameersbn/docker-gitlab.git
synced 2026-01-18 13:58:25 +00:00
Required version is updated from v18.16.x to v20.13.x
with GitLab v17.0.0 release.
Documentation:
- "Bump required Node.js version to 20 in installation guide"
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/154523
.tool-versions:
- "Update .tool-versions and .nvmrc to use nodejs v20.12.2"
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/149615
- Set distro to "nodistro" for nodejs to get later updates
GitLab v17.0.0 or later requires (grants) nodejs v20.13.x or later,
but nodejs v20.5.1 is installed for focal even later LTS are released.
To avoid this issue, official installer script uses "nodistro"
instead of specific distribution.
See:
83867e0fdd/scripts/deb/setup_20.x (L74)
88 lines
3.6 KiB
Docker
88 lines
3.6 KiB
Docker
FROM ubuntu:focal-20240530
|
|
|
|
ARG VERSION=17.0.2
|
|
|
|
ENV GITLAB_VERSION=${VERSION} \
|
|
RUBY_VERSION=3.2.4 \
|
|
RUBY_SOURCE_SHA256SUM="c72b3c5c30482dca18b0f868c9075f3f47d8168eaf626d4e682ce5b59c858692" \
|
|
GOLANG_VERSION=1.22.4 \
|
|
GITLAB_SHELL_VERSION=14.35.0 \
|
|
GITLAB_PAGES_VERSION=17.0.2 \
|
|
GITALY_SERVER_VERSION=17.0.2 \
|
|
GITLAB_USER="git" \
|
|
GITLAB_HOME="/home/git" \
|
|
GITLAB_LOG_DIR="/var/log/gitlab" \
|
|
GITLAB_CACHE_DIR="/etc/docker-gitlab" \
|
|
RAILS_ENV=production \
|
|
NODE_ENV=production
|
|
|
|
ENV GITLAB_INSTALL_DIR="${GITLAB_HOME}/gitlab" \
|
|
GITLAB_SHELL_INSTALL_DIR="${GITLAB_HOME}/gitlab-shell" \
|
|
GITLAB_GITALY_INSTALL_DIR="${GITLAB_HOME}/gitaly" \
|
|
GITLAB_DATA_DIR="${GITLAB_HOME}/data" \
|
|
GITLAB_BUILD_DIR="${GITLAB_CACHE_DIR}/build" \
|
|
GITLAB_RUNTIME_DIR="${GITLAB_CACHE_DIR}/runtime"
|
|
|
|
RUN apt-get update \
|
|
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
|
|
wget ca-certificates apt-transport-https gnupg2 \
|
|
&& apt-get upgrade -y \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN set -ex && \
|
|
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv E1DD270288B4E6030699E45FA1715D88E1DF1F24 \
|
|
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu focal main" >> /etc/apt/sources.list \
|
|
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 8B3981E7A6852F782CC4951600A6F0A3C300EE8C \
|
|
&& echo "deb http://ppa.launchpad.net/nginx/stable/ubuntu focal main" >> /etc/apt/sources.list \
|
|
&& wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
|
|
&& echo 'deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main' > /etc/apt/sources.list.d/pgdg.list \
|
|
&& wget --quiet -O - https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - \
|
|
&& echo 'deb https://deb.nodesource.com/node_20.x nodistro main' > /etc/apt/sources.list.d/nodesource.list \
|
|
&& wget --quiet -O - https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
|
|
&& echo 'deb https://dl.yarnpkg.com/debian/ stable main' > /etc/apt/sources.list.d/yarn.list \
|
|
&& set -ex \
|
|
&& apt-get update \
|
|
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
|
|
sudo supervisor logrotate locales curl \
|
|
nginx openssh-server postgresql-contrib redis-tools \
|
|
postgresql-client-13 postgresql-client-14 postgresql-client-15 \
|
|
python3 python3-docutils nodejs yarn gettext-base graphicsmagick \
|
|
libpq5 zlib1g libyaml-0-2 libssl1.1 \
|
|
libgdbm6 libreadline8 libncurses5 libffi7 \
|
|
libxml2 libxslt1.1 libcurl4 libicu66 libre2-dev tzdata unzip libimage-exiftool-perl \
|
|
libmagic1 \
|
|
&& update-locale LANG=C.UTF-8 LC_MESSAGES=POSIX \
|
|
&& locale-gen en_US.UTF-8 \
|
|
&& DEBIAN_FRONTEND=noninteractive dpkg-reconfigure locales \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY assets/build/ ${GITLAB_BUILD_DIR}/
|
|
RUN bash ${GITLAB_BUILD_DIR}/install.sh
|
|
|
|
COPY assets/runtime/ ${GITLAB_RUNTIME_DIR}/
|
|
COPY entrypoint.sh /sbin/entrypoint.sh
|
|
RUN chmod 755 /sbin/entrypoint.sh
|
|
|
|
ENV prometheus_multiproc_dir="/dev/shm"
|
|
|
|
ARG BUILD_DATE
|
|
ARG VCS_REF
|
|
|
|
LABEL \
|
|
maintainer="sameer@damagehead.com" \
|
|
org.label-schema.schema-version="1.0" \
|
|
org.label-schema.build-date=${BUILD_DATE} \
|
|
org.label-schema.name=gitlab \
|
|
org.label-schema.vendor=damagehead \
|
|
org.label-schema.url="https://github.com/sameersbn/docker-gitlab" \
|
|
org.label-schema.vcs-url="https://github.com/sameersbn/docker-gitlab.git" \
|
|
org.label-schema.vcs-ref=${VCS_REF} \
|
|
com.damagehead.gitlab.license=MIT
|
|
|
|
EXPOSE 22/tcp 80/tcp 443/tcp
|
|
|
|
VOLUME ["${GITLAB_DATA_DIR}", "${GITLAB_LOG_DIR}","${GITLAB_HOME}/gitlab/node_modules"]
|
|
WORKDIR ${GITLAB_INSTALL_DIR}
|
|
ENTRYPOINT ["/sbin/entrypoint.sh"]
|
|
CMD ["app:start"]
|