You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 16, 2024. It is now read-only.
# Copy gitlab-runner binary from the server into the container
68
96
if [ -x /usr/local/bin/gitlab-runner ];then
@@ -72,23 +100,12 @@ install_dependencies() {
72
100
fi
73
101
74
102
# Install bash in systems with APK (e.g., Alpine)
75
-
podman exec"$CONTAINER_ID" sh -c 'if ! type bash >/dev/null 2>&1 && type apk >/dev/null 2>&1 ; then echo "APK based distro without bash"; apk add bash; fi'
76
-
77
-
# Install git in systems with APT (e.g., Debian)
78
-
podman exec"$CONTAINER_ID" /bin/bash -c 'if ! type git >/dev/null 2>&1 && type apt-get >/dev/null 2>&1 ; then echo "APT based distro without git"; apt-get update && apt-get install --no-install-recommends -y ca-certificates git; fi'
79
-
# Install git in systems with DNF (e.g., Fedora)
80
-
podman exec"$CONTAINER_ID" /bin/bash -c 'if ! type git >/dev/null 2>&1 && type dnf >/dev/null 2>&1 ; then echo "DNF based distro without git"; dnf install --setopt=install_weak_deps=False --assumeyes git; fi'
81
-
# Install git in systems with APK (e.g., Alpine)
82
-
podman exec"$CONTAINER_ID" /bin/bash -c 'if ! type git >/dev/null 2>&1 && type apk >/dev/null 2>&1 ; then echo "APK based distro without git"; apk add git; fi'
83
-
# Install git in systems with YUM (e.g., RHEL<=7)
84
-
podman exec"$CONTAINER_ID" /bin/bash -c 'if ! type git >/dev/null 2>&1 && type yum >/dev/null 2>&1 ; then echo "YUM based distro without git"; yum install --assumeyes git; fi'
85
-
86
-
# Install git-lfs in systems with APT (e.g., Debian)
87
-
podman exec"$CONTAINER_ID" /bin/bash -c 'if ! type git-lfs >/dev/null 2>&1 && type apt-get >/dev/null 2>&1 ; then echo "APT based distro without git-lfs"; apt-get update && apt-get install --no-install-recommends -y ca-certificates git-lfs; fi'
88
-
# Install git-lfs in systems with DNF (e.g., Fedora)
89
-
podman exec"$CONTAINER_ID" /bin/bash -c 'if ! type git-lfs >/dev/null 2>&1 && type dnf >/dev/null 2>&1 ; then echo "DNF based distro without git-lfs"; dnf install --setopt=install_weak_deps=False --assumeyes git-lfs; fi'
90
-
# Install git-lfs in systems with APK (e.g., Alpine)
91
-
podman exec"$CONTAINER_ID" /bin/bash -c 'if ! type git-lfs >/dev/null 2>&1 && type apk >/dev/null 2>&1 ; then echo "APK based distro without git-lfs"; apk add git-lfs; fi'
103
+
podman exec --user root:root "$CONTAINER_ID" sh -c 'if ! type bash >/dev/null 2>&1 && type apk >/dev/null 2>&1 ; then echo "APK based distro without bash"; apk add bash; fi'
104
+
105
+
install_command ca-certificates
106
+
install_command git
107
+
# Not available on all systems, e.g., Debian 9 or RHEL 7
0 commit comments