mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
minor: read Dockerfile from stdin
This commit is contained in:
parent
3e7ef49bde
commit
cf35a270bb
@ -52,7 +52,7 @@ fi
|
||||
# Detect docker env is setup
|
||||
if ! $DOCKER_EXECUTABLE images | grep -q cwcc-spc-$SPC_USE_ARCH; then
|
||||
echo "Docker container does not exist. Building docker image ..."
|
||||
ALPINE_DOCKERFILE=$(cat << EOF
|
||||
$DOCKER_EXECUTABLE build -t cwcc-spc-$SPC_USE_ARCH -f- . <<EOF
|
||||
FROM $ALPINE_FROM
|
||||
$SPC_USE_MIRROR
|
||||
RUN apk update
|
||||
@ -63,13 +63,8 @@ WORKDIR /app
|
||||
ADD ./src /app/src
|
||||
ADD ./composer.json /app/composer.json
|
||||
ADD ./bin /app/bin
|
||||
RUN composer update --no-dev
|
||||
RUN composer update --no-dev --classmap-authoritative
|
||||
EOF
|
||||
)
|
||||
echo "$ALPINE_DOCKERFILE" > "$(pwd)"/Dockerfile
|
||||
|
||||
$DOCKER_EXECUTABLE build -t cwcc-spc-$SPC_USE_ARCH .
|
||||
rm "$(pwd)"/Dockerfile
|
||||
fi
|
||||
|
||||
# Check if in ci (local terminal can execute with -it)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user