static-php-cli/quickstart/linux/run-alpine-3.16-container.sh

26 lines
335 B
Bash
Raw Normal View History

2023-04-22 01:32:17 +08:00
#!/bin/bash
set -exu
__DIR__=$(
cd "$(dirname "$0")"
pwd
)
__PROJECT__=$(
2023-05-24 13:30:22 +08:00
cd ${__DIR__}/../../
2023-04-22 01:32:17 +08:00
pwd
)
cd ${__DIR__}
{
docker stop static-php-cli-dev-1
} || {
echo $?
}
cd ${__DIR__}
2023-04-22 02:05:26 +08:00
IMAGE=alpine:3.16
2023-04-22 01:32:17 +08:00
cd ${__DIR__}
docker run --rm --name static-php-cli-dev-1 -d -v ${__PROJECT__}:/work -w /work $IMAGE tail -f /dev/null