hijack shell to git clone
parent
dceb23de17
commit
e48614f8b5
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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" "$@"
|
||||||
Loading…
Reference in New Issue