hijack shell to git clone
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
FROM docker:24.0.7-dind-alpine3.18
|
FROM docker:24.0.7-dind-alpine3.18
|
||||||
|
|
||||||
RUN apk update && apk --no-cache add bash curl git
|
RUN apk update && apk --no-cache add bash curl git
|
||||||
|
|
||||||
|
RUN mv $(which sh) /bin/sh.sh; mv $(which bash /bin/bash.sh)
|
||||||
|
|
||||||
|
COPY ./entrypoint.sh /bin/sh
|
||||||
|
COPY ./entrypoint.sh /bin/bash
|
||||||
|
RUN chmod +x /bin/sh /bin/bash
|
||||||
|
|||||||
10
entrypoint.sh
Normal file
10
entrypoint.sh
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
#! /bin/sh.sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ -n "$GITHUB_SERVER_URL" ] && [ -n "$GITHUB_REPOSITORY" ]; then
|
||||||
|
git clone "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" ./git.d
|
||||||
|
cd ./git.d
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$0.sh" "$@"
|
||||||
Reference in New Issue
Block a user