-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
45b30b9
commit b1a1914
Showing
3 changed files
with
38 additions
and
13 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM php:8-alpine | ||
|
||
RUN set -eux ; \ | ||
apk add --no-cache \ | ||
tini | ||
|
||
RUN curl https://github.com/acquia/cli/releases/latest/download/acli.phar -L -o /usr/local/bin/acli \ | ||
&& chmod +x /usr/local/bin/acli | ||
|
||
COPY docker-entrypoint.sh /docker-entrypoint.sh | ||
|
||
ENTRYPOINT ["/docker-entrypoint.sh"] | ||
|
||
CMD ["acli"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/sh | ||
|
||
isCommand() { | ||
# Retain backwards compatibility with common CI providers, | ||
# see: https://github.com/composer/docker/issues/107 | ||
if [ "$1" = "sh" ]; then | ||
return 1 | ||
fi | ||
|
||
acli help --no-interaction "$1" > /dev/null 2>&1 | ||
} | ||
|
||
# check if the first argument passed in looks like a flag | ||
if [ "${1#-}" != "$1" ]; then | ||
set -- /sbin/tini -- acli "$@" | ||
# check if the first argument passed in is acli | ||
elif [ "$1" = 'acli' ]; then | ||
set -- /sbin/tini -- "$@" | ||
# check if the first argument passed in matches a known command | ||
elif isCommand "$1"; then | ||
set -- /sbin/tini -- acli "$@" | ||
fi | ||
|
||
exec "$@" |