以下脚本是docker图像的入口点。
run.sh
#!/bin/bash
# wrapper function for docker entrypoint, allows:
# docker run -> runs the service
# docker run test -> runs the tests
set -e
export CLI='src/cli.py'
if [[ "$1" == "test"* ]]; then
py.test tests
exit $?
elif [[ "$1" == "junit"* ]]; then
mkdir -p /junit
py.test --junitxml=/junit/test-results.xml tests
exit $?
fi;
python3 -u "$CLI" "$BACKEND"
这个错误是什么意思?
./run.sh: line 20: 5 Illegal instruction python3 -u "$CLI" "$BACKEND"
容器启动并运行,所以我猜它有时会失败,重新启动然后工作。