Skip to content

Commit

Permalink
Updated to 16.1.2-ce.0 and moved to Debian 12 bookworm (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
pozgo authored Jul 18, 2023
1 parent 75a3e19 commit 34b65d8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
- name: Test image
run: |
export RELEASE=$(grep "RELEASE_VERSION=" Dockerfile | sed 's|^.*=||g' |awk '{print $1}')
docker run -d -p 80:80 --name gitlab -e BACKUP_TIME="0 15 * * *" polinux/gitlab-ce:$RELEASE
while true; do if docker logs gitlab | grep "Completed 200 OK in"; then break; else sleep 30; fi done
docker run -d --privileged -p 80:80 --name gitlab -e BACKUP_TIME="0 15 * * *" polinux/gitlab-ce:$RELEASE
while true; do if docker logs gitlab | grep "GET /database HTTP/1.1"; then break; else sleep 30; fi done
curl -sSLi --head http://127.0.0.1 | grep "HTTP/1.1 200 OK"
- name: Stage Image
run: |
Expand Down
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM ubuntu:xenial-20210416
FROM debian:12

ENV BACKUP_TIME="0 12 * * *" \
PATH=/opt/gitlab/embedded/bin:/opt/gitlab/bin:/assets:$PATH \
TERM=xterm \
PACKAGECLOUD_REPO=gitlab-ce \
RELEASE_PACKAGE=gitlab-ce \
RELEASE_VERSION=14.6.0-ce.0 \
DOWNLOAD_URL=https://downloads-packages.s3.amazonaws.com/ubuntu-xenial/gitlab-ce_14.6.0-ce.0_amd64.deb
RELEASE_VERSION=16.1.2-ce.0 \
DOWNLOAD_URL=https://packages.gitlab.com/gitlab/gitlab-ce/packages/debian/bookworm/gitlab-ce_16.1.2-ce.0_amd64.deb/download.deb

COPY container-files /

Expand All @@ -20,6 +20,7 @@ RUN \
vim \
tzdata \
cron \
perl \
nano && \
rm -rf /var/lib/apt/lists/* && \
sed 's/session\s*required\s*pam_loginuid.so/session optional pam_loginuid.so/g' -i /etc/pam.d/sshd && \
Expand Down
2 changes: 1 addition & 1 deletion container-files/assets/download-package
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

if [[ ${DOWNLOAD_URL} == *"amazonaws"* ]]; then
echo "Downloading package from Amazon bucket - ${DOWNLOAD_URL}"
wget ${DOWNLOAD_URL} -O /tmp/gitlab.deb
wget --content-disposition ${DOWNLOAD_URL} -O /tmp/gitlab.deb
else
echo "Downloading package as artifact - ${DOWNLOAD_URL}"
# If we are fetching the package which is available as an artifact, we need
Expand Down
2 changes: 0 additions & 2 deletions container-files/assets/setup
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

set -e

source /etc/lsb-release

# Install GitLab
DOWNLOAD_URL=${DOWNLOAD_URL} TRIGGER_PRIVATE_TOKEN=${TRIGGER_PRIVATE_TOKEN} /assets/download-package && dpkg -i /tmp/gitlab.deb && rm /tmp/gitlab.deb
rm -rf /var/lib/apt/lists/*
Expand Down
1 change: 1 addition & 0 deletions container-files/assets/wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ crontab -l
if [[ ! -e /etc/gitlab/gitlab.rb ]]; then
echo "Installing gitlab.rb config..."
cp /opt/gitlab/etc/gitlab.rb.template /etc/gitlab/gitlab.rb
echo "package['modify_kernel_parameters'] = false" >> /etc/gitlab/gitlab.rb
chmod 0600 /etc/gitlab/gitlab.rb
fi

Expand Down

0 comments on commit 34b65d8

Please sign in to comment.