【发布时间】:2022-01-18 07:05:30
【问题描述】:
我从节点 docker 镜像中创建了一个容器。然后我用 bash 进入容器并尝试编辑入口点文件,但我在里面所做的更改没有得到执行。就像我告诉它在容器的根路径中创建一个名为/app 的目录一样,我停止并启动容器,但没有发生更改。这是文件
#!/bin/sh
set -e
mkdir /app
# Run command with node if the first argument contains a "-" or is not a system command. The last
# part inside the "{}" is a workaround for the following bug in ash/dash:
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=874264
if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ] || { [ -f "${1}" ] && ! [ -x "${1}" ]; }; then
set -- node "$@"
fi
exec "$@"
【问题讨论】: