提交 534074fb 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

need `xauth` package to start xvfb, support code filename as docker arg #66

上级 decaf25b
......@@ -16,6 +16,7 @@ RUN apt-get update > /dev/null \
figlet \
libgconf-2-4 \
vim \
xauth \
xvfb \
> /dev/null \
&& rm -rf /tmp/* /var/lib/apt/lists/*
......@@ -30,5 +31,7 @@ RUN npm --progress false install > /dev/null \
COPY . .
RUN npm --progress false link
VOLUME [ "/app" ]
ENTRYPOINT [ "/wechaty/bin/entrypoint.sh" ]
CMD [ "start" ]
#!/bin/sh
#!/bin/bash
#
# Wechaty - Connect ChatBots
#
......@@ -30,6 +30,18 @@ then
exit $?
fi
if [[ "$1" == *.ts || "$1" == *.js ]]; then
appFile="/app/$1"
if [ -f "$appFile" ]; then
echo "Executing ts-node /app/$@"
exec ts-node "/app/$@"
exit $?
else
echo "ERROR: can not found app file: $appfile"
exit -1
fi
fi
exec npm $@
exit $?
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册