|
4 | 4 | # GLOBAL |
5 | 5 | ARG APP_UID=1000 \ |
6 | 6 | APP_GID=1000 \ |
7 | | - BUILD_SRC=https://github.com/git/git.git \ |
8 | | - BUILD_ROOT=/git |
| 7 | + BUILD_ROOT=/git \ |
| 8 | + DEP_OPENSSL_VERSION=3.5.3 \ |
| 9 | + DEP_ZLIB_VERSION=1.3.1 \ |
| 10 | + DEP_CURL_VERSION=8.16.0 |
9 | 11 | ARG BUILD_BIN=${BUILD_ROOT}/git |
10 | 12 |
|
11 | 13 | # :: FOREIGN IMAGES |
|
15 | 17 | # ╔═════════════════════════════════════════════════════╗ |
16 | 18 | # ║ BUILD ║ |
17 | 19 | # ╚═════════════════════════════════════════════════════╝ |
18 | | -# :: GIT |
| 20 | +# :: OPENSSL & ZLIB & CURL |
19 | 21 | FROM alpine AS build |
20 | 22 | COPY --from=util-bin / / |
| 23 | + |
21 | 24 | ARG APP_VERSION \ |
22 | | - APP_ROOT \ |
23 | | - BUILD_SRC \ |
| 25 | + TARGETARCH \ |
| 26 | + TARGETVARIANT \ |
| 27 | + DEP_OPENSSL_VERSION \ |
| 28 | + DEP_ZLIB_VERSION \ |
| 29 | + DEP_CURL_VERSION \ |
24 | 30 | BUILD_ROOT \ |
25 | 31 | BUILD_BIN |
26 | 32 |
|
27 | 33 | RUN set -ex; \ |
28 | | - apk --no-cache --update add \ |
| 34 | + apk --update --no-cache add \ |
| 35 | + gpg \ |
| 36 | + gpg-agent \ |
| 37 | + perl \ |
29 | 38 | g++ \ |
30 | | - autoconf \ |
31 | | - automake \ |
32 | 39 | make \ |
| 40 | + linux-headers \ |
33 | 41 | git \ |
34 | | - zlib-static \ |
35 | | - tcl-dev; |
| 42 | + cmake \ |
| 43 | + build-base \ |
| 44 | + samurai \ |
| 45 | + python3 \ |
| 46 | + py3-pkgconfig \ |
| 47 | + pkgconfig \ |
| 48 | + pv \ |
| 49 | + autoconf \ |
| 50 | + automake \ |
| 51 | + xz \ |
| 52 | + wget \ |
| 53 | + pcre-dev \ |
| 54 | + pcre-static \ |
| 55 | + pcre2-dev \ |
| 56 | + pcre2-static \ |
| 57 | + expat-dev \ |
| 58 | + expat-static \ |
| 59 | + musl-libintl; |
| 60 | + |
| 61 | + # OPENSSL |
| 62 | + RUN set -ex; \ |
| 63 | + eleven github asset openssl/openssl openssl-${DEP_OPENSSL_VERSION} openssl-${DEP_OPENSSL_VERSION}.tar.gz; |
| 64 | + |
| 65 | + RUN set -ex; \ |
| 66 | + cd /openssl-${DEP_OPENSSL_VERSION}; \ |
| 67 | + case "${TARGETARCH}${TARGETVARIANT}" in \ |
| 68 | + "amd64"|"arm64") \ |
| 69 | + ./Configure \ |
| 70 | + -static \ |
| 71 | + --openssldir=/etc/ssl; \ |
| 72 | + ;; \ |
| 73 | + \ |
| 74 | + "armv7") \ |
| 75 | + ./Configure \ |
| 76 | + linux-generic32 \ |
| 77 | + -static \ |
| 78 | + --openssldir=/etc/ssl; \ |
| 79 | + ;; \ |
| 80 | + esac; \ |
| 81 | + make -s -j $(nproc) 2>&1 > /dev/null; \ |
| 82 | + make -s -j $(nproc) install_sw 2>&1 > /dev/null; |
| 83 | + |
| 84 | + RUN set -ex; \ |
| 85 | + cp -af /openssl-${DEP_OPENSSL_VERSION}/libssl.a /usr/lib; \ |
| 86 | + cp -af /openssl-${DEP_OPENSSL_VERSION}/libcrypto.a /usr/lib; |
| 87 | + |
| 88 | + # ZLIB |
| 89 | + RUN set -ex; \ |
| 90 | + eleven github asset madler/zlib v${DEP_ZLIB_VERSION} zlib-${DEP_ZLIB_VERSION}.tar.gz; |
36 | 91 |
|
37 | 92 | RUN set -ex; \ |
38 | | - git clone --recurse-submodules -j8 ${BUILD_SRC} -b v${APP_VERSION}; |
| 93 | + cd /zlib-${DEP_ZLIB_VERSION}; \ |
| 94 | + ./configure --static; \ |
| 95 | + make -s -j $(nproc) 2>&1 > /dev/null; \ |
| 96 | + make -s -j $(nproc) install 2>&1 > /dev/null; |
39 | 97 |
|
40 | 98 | RUN set -ex; \ |
41 | | - cd ${BUILD_ROOT}; \ |
42 | | - make configure; \ |
43 | | - CFLAGS="-static -L/usr/local/lib -lcurl -lnghttp2 -lssl -lcrypto -ldl -pthread -lz -lssl -lcrypto -ldl -pthread -lz -lz -lssl -lcrypto -ldl -pthread -lnghttp2" \ |
| 99 | + cp -af /zlib-${DEP_ZLIB_VERSION}/libz.a /usr/lib; |
| 100 | + |
| 101 | + # CURL |
| 102 | + RUN set -ex; \ |
| 103 | + gpg --keyserver hkp://keys.gnupg.net --recv-keys 27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2; \ |
| 104 | + wget -q --show-progress --progress=bar:force https://curl.se/download/curl-${DEP_CURL_VERSION}.tar.xz; \ |
| 105 | + wget -q --show-progress --progress=bar:force https://curl.se/download/curl-${DEP_CURL_VERSION}.tar.xz.asc; |
| 106 | + |
| 107 | + RUN set -ex; \ |
| 108 | + gpg --verify curl-${DEP_CURL_VERSION}.tar.xz.asc curl-${DEP_CURL_VERSION}.tar.xz; \ |
| 109 | + pv curl-${DEP_CURL_VERSION}.tar.xz | tar xJ; |
| 110 | + |
| 111 | + RUN set -ex; \ |
| 112 | + cd /curl-${DEP_CURL_VERSION}; \ |
| 113 | + LDFLAGS="-static" PKG_CONFIG="pkg-config --static" \ |
44 | 114 | ./configure \ |
45 | | - --with-curl; \ |
46 | | - make -s -j $(nproc) 2>&1 > /dev/null; |
| 115 | + --disable-shared \ |
| 116 | + --enable-static \ |
| 117 | + --disable-ldap \ |
| 118 | + --disable-ipv6 \ |
| 119 | + --enable-unix-sockets \ |
| 120 | + --with-ssl \ |
| 121 | + --disable-docs \ |
| 122 | + --disable-manual \ |
| 123 | + --without-libpsl; \ |
| 124 | + make -s -j $(nproc) V=1 LDFLAGS="-static -all-static" 2>&1 > /dev/null; |
47 | 125 |
|
48 | 126 | RUN set -ex; \ |
49 | | - eleven distroless ${BUILD_BIN}; |
| 127 | + cp -af /curl-${DEP_CURL_VERSION}/lib/.libs/libcurl.a /usr/lib; |
50 | 128 |
|
| 129 | + # GIT |
| 130 | + RUN set -ex; \ |
| 131 | + eleven git clone git/git.git v${APP_VERSION}; |
| 132 | + |
| 133 | + RUN set -ex; \ |
| 134 | + cd ${BUILD_ROOT}; \ |
| 135 | + make \ |
| 136 | + NO_GETTEXT=YesPlease \ |
| 137 | + NO_SVN_TESTS=YesPlease \ |
| 138 | + NO_REGEX=YesPlease \ |
| 139 | + NO_SYS_POLL_H=1 \ |
| 140 | + INSTALL_SYMLINKS=1 \ |
| 141 | + NO_PYTHON=YesPlease \ |
| 142 | + NO_TCLTK=YesPlease \ |
| 143 | + ICONV_OMITS_BOM=Yes \ |
| 144 | + USE_LIBPCRE2=YesPlease \ |
| 145 | + ZLIB_PATH=/zlib-${DEP_ZLIB_VERSION} \ |
| 146 | + OPENSSLDIR=/openssl-${DEP_OPENSSL_VERSION} \ |
| 147 | + CURLDIR=/curl-${DEP_CURL_VERSION} \ |
| 148 | + CURL_LDFLAGS="-lcurl -lssl -lcrypto -lz" \ |
| 149 | + LDFLAGS="-static" |
| 150 | + |
| 151 | + RUN set -ex; \ |
| 152 | + cd ${BUILD_ROOT}; \ |
| 153 | + eleven distroless ${BUILD_BIN}; \ |
| 154 | + eleven distroless ${BUILD_ROOT}/git-difftool--helper; \ |
| 155 | + eleven distroless ${BUILD_ROOT}/git-filter-branch; \ |
| 156 | + eleven distroless ${BUILD_ROOT}/git-http-fetch; \ |
| 157 | + eleven distroless ${BUILD_ROOT}/git-http-push; \ |
| 158 | + eleven distroless ${BUILD_ROOT}/git-merge-octopus; \ |
| 159 | + eleven distroless ${BUILD_ROOT}/git-merge-one-file; \ |
| 160 | + eleven distroless ${BUILD_ROOT}/git-merge-resolve; \ |
| 161 | + eleven distroless ${BUILD_ROOT}/git-mergetool; \ |
| 162 | + eleven distroless ${BUILD_ROOT}/git-mergetool--lib; \ |
| 163 | + eleven distroless ${BUILD_ROOT}/git-quiltimport; \ |
| 164 | + eleven distroless ${BUILD_ROOT}/git-remote-http; \ |
| 165 | + eleven distroless ${BUILD_ROOT}/git-request-pull; \ |
| 166 | + eleven distroless ${BUILD_ROOT}/git-sh-i18n; \ |
| 167 | + eleven distroless ${BUILD_ROOT}/git-sh-i18n--envsubst; \ |
| 168 | + eleven distroless ${BUILD_ROOT}/git-sh-setup; \ |
| 169 | + eleven distroless ${BUILD_ROOT}/git-submodule; \ |
| 170 | + eleven distroless ${BUILD_ROOT}/git-web--browse; |
| 171 | + |
| 172 | + RUN set -ex; \ |
| 173 | + mkdir -p ${APP_ROOT}/opt/git; \ |
| 174 | + cp -af ${BUILD_ROOT}/templates ${APP_ROOT}/opt/git; |
| 175 | + |
| 176 | + RUN set -ex; \ |
| 177 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git; \ |
| 178 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-add; \ |
| 179 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-am; \ |
| 180 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-annotate; \ |
| 181 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-apply; \ |
| 182 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-archive; \ |
| 183 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-backfill; \ |
| 184 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-bisect; \ |
| 185 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-blame; \ |
| 186 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-branch; \ |
| 187 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-bugreport; \ |
| 188 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-bundle; \ |
| 189 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-cat-file; \ |
| 190 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-check-attr; \ |
| 191 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-check-ignore; \ |
| 192 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-check-mailmap; \ |
| 193 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-check-ref-format; \ |
| 194 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-checkout; \ |
| 195 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-checkout--worker; \ |
| 196 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-checkout-index; \ |
| 197 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-cherry; \ |
| 198 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-cherry-pick; \ |
| 199 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-clean; \ |
| 200 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-clone; \ |
| 201 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-column; \ |
| 202 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-commit; \ |
| 203 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-commit-graph; \ |
| 204 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-commit-tree; \ |
| 205 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-config; \ |
| 206 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-count-objects; \ |
| 207 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-credential; \ |
| 208 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-credential-cache; \ |
| 209 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-credential-cache--daemon; \ |
| 210 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-credential-store; \ |
| 211 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-describe; \ |
| 212 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-diagnose; \ |
| 213 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-diff; \ |
| 214 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-diff-files; \ |
| 215 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-diff-index; \ |
| 216 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-diff-tree; \ |
| 217 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-difftool; \ |
| 218 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-fast-export; \ |
| 219 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-fetch; \ |
| 220 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-fetch-pack; \ |
| 221 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-fmt-merge-msg; \ |
| 222 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-for-each-ref; \ |
| 223 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-for-each-repo; \ |
| 224 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-format-patch; \ |
| 225 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-fsck; \ |
| 226 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-fsck-objects; \ |
| 227 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-fsmonitor--daemon; \ |
| 228 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-gc; \ |
| 229 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-get-tar-commit-id; \ |
| 230 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-grep; \ |
| 231 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-hash-object; \ |
| 232 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-help; \ |
| 233 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-hook; \ |
| 234 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-index-pack; \ |
| 235 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-init; \ |
| 236 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-init-db; \ |
| 237 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-interpret-trailers; \ |
| 238 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-log; \ |
| 239 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-ls-files; \ |
| 240 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-ls-remote; \ |
| 241 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-ls-tree; \ |
| 242 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-mailinfo; \ |
| 243 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-mailsplit; \ |
| 244 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-maintenance; \ |
| 245 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-merge; \ |
| 246 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-merge-base; \ |
| 247 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-merge-file; \ |
| 248 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-merge-index; \ |
| 249 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-merge-ours; \ |
| 250 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-merge-recursive; \ |
| 251 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-merge-subtree; \ |
| 252 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-merge-tree; \ |
| 253 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-mktag; \ |
| 254 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-mktree; \ |
| 255 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-multi-pack-index; \ |
| 256 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-mv; \ |
| 257 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-name-rev; \ |
| 258 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-notes; \ |
| 259 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-pack-objects; \ |
| 260 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-pack-redundant; \ |
| 261 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-pack-refs; \ |
| 262 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-patch-id; \ |
| 263 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-prune; \ |
| 264 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-prune-packed; \ |
| 265 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-pull; \ |
| 266 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-push; \ |
| 267 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-range-diff; \ |
| 268 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-read-tree; \ |
| 269 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-rebase; \ |
| 270 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-receive-pack; \ |
| 271 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-reflog; \ |
| 272 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-refs; \ |
| 273 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-remote; \ |
| 274 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-remote-ext; \ |
| 275 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-remote-fd; \ |
| 276 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-repack; \ |
| 277 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-replace; \ |
| 278 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-replay; \ |
| 279 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-rerere; \ |
| 280 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-reset; \ |
| 281 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-restore; \ |
| 282 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-rev-list; \ |
| 283 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-rev-parse; \ |
| 284 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-revert; \ |
| 285 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-rm; \ |
| 286 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-send-pack; \ |
| 287 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-shortlog; \ |
| 288 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-show; \ |
| 289 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-show-branch; \ |
| 290 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-show-index; \ |
| 291 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-show-ref; \ |
| 292 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-sparse-checkout; \ |
| 293 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-stage; \ |
| 294 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-stash; \ |
| 295 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-status; \ |
| 296 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-stripspace; \ |
| 297 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-submodule--helper; \ |
| 298 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-switch; \ |
| 299 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-symbolic-ref; \ |
| 300 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-tag; \ |
| 301 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-unpack-file; \ |
| 302 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-unpack-objects; \ |
| 303 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-update-index; \ |
| 304 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-update-ref; \ |
| 305 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-update-server-info; \ |
| 306 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-upload-archive; \ |
| 307 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-upload-pack; \ |
| 308 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-var; \ |
| 309 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-verify-commit; \ |
| 310 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-verify-pack; \ |
| 311 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-verify-tag; \ |
| 312 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-version; \ |
| 313 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-whatchanged; \ |
| 314 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-worktree; \ |
| 315 | + ln -sf /usr/local/bin/git ${APP_ROOT}/opt/git/git-write-tree; \ |
| 316 | + ln -sf /usr/local/bin/git-remote-http ${APP_ROOT}/opt/git/git-remote-ftp; \ |
| 317 | + ln -sf /usr/local/bin/git-remote-http ${APP_ROOT}/opt/git/git-remote-ftps; \ |
| 318 | + ln -sf /usr/local/bin/git-remote-http ${APP_ROOT}/opt/git/git-remote-http; \ |
| 319 | + ln -sf /usr/local/bin/git-remote-http ${APP_ROOT}/opt/git/git-remote-https; \ |
| 320 | + ln -sf /usr/local/bin/git-difftool--helper ${APP_ROOT}/opt/git/git-difftool--helper; \ |
| 321 | + ln -sf /usr/local/bin/git-filter-branch ${APP_ROOT}/opt/git/git-filter-branch; \ |
| 322 | + ln -sf /usr/local/bin/git-http-fetch ${APP_ROOT}/opt/git/git-http-fetch; \ |
| 323 | + ln -sf /usr/local/bin/git-http-push ${APP_ROOT}/opt/git/git-http-push; \ |
| 324 | + ln -sf /usr/local/bin/git-merge-octopus ${APP_ROOT}/opt/git/git-merge-octopus; \ |
| 325 | + ln -sf /usr/local/bin/git-merge-one-file ${APP_ROOT}/opt/git/git-merge-one-file; \ |
| 326 | + ln -sf /usr/local/bin/git-merge-resolve ${APP_ROOT}/opt/git/git-merge-resolve; \ |
| 327 | + ln -sf /usr/local/bin/git-mergetool ${APP_ROOT}/opt/git/git-mergetool; \ |
| 328 | + ln -sf /usr/local/bin/git-mergetool--lib ${APP_ROOT}/opt/git/git-mergetool--lib; \ |
| 329 | + ln -sf /usr/local/bin/git-quiltimport ${APP_ROOT}/opt/git/git-quiltimport; \ |
| 330 | + ln -sf /usr/local/bin/git-request-pull ${APP_ROOT}/opt/git/git-request-pull; \ |
| 331 | + ln -sf /usr/local/bin/git-sh-i18n ${APP_ROOT}/opt/git/git-sh-i18n; \ |
| 332 | + ln -sf /usr/local/bin/git-sh-i18n--envsubst ${APP_ROOT}/opt/git/git-sh-i18n--envsubst; \ |
| 333 | + ln -sf /usr/local/bin/git-sh-setup ${APP_ROOT}/opt/git/git-sh-setup; \ |
| 334 | + ln -sf /usr/local/bin/git-submodule ${APP_ROOT}/opt/git/git-submodule; \ |
| 335 | + ln -sf /usr/local/bin/git-web--browse ${APP_ROOT}/opt/git/git-web--browse; |
51 | 336 |
|
52 | 337 | # ╔═════════════════════════════════════════════════════╗ |
53 | 338 | # ║ IMAGE ║ |
|
74 | 359 | APP_VERSION=${APP_VERSION} \ |
75 | 360 | APP_ROOT=${APP_ROOT} |
76 | 361 |
|
| 362 | + # :: app specific environment |
| 363 | + ENV GIT_TEMPLATE_DIR=/opt/git/templates \ |
| 364 | + GIT_EXEC_PATH=/opt/git |
| 365 | + |
77 | 366 | # :: multi-stage |
78 | | - COPY --from=build ${APP_ROOT}/ / |
| 367 | + COPY --from=build /distroless/ / |
79 | 368 |
|
80 | 369 | # :: EXECUTE |
81 | 370 | USER ${APP_UID}:${APP_GID} |
|
0 commit comments