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

enhance(docker): add onbuild support to docker image (#147)

上级 f29c38e3
FROM zixia/wechaty
WORKDIR /bot/
ONBUILD COPY package.json /bot/
ONBUILD RUN npm install && npm cache clean
ONBUILD COPY . /bot/
CMD [ "npm", "start" ]
......@@ -5,7 +5,7 @@
#
set -e
imageName='wechaty:test'
imageName='zixia/wechaty'
optRm='--rm'
[ -n "$CIRCLECI" ] && optRm='--rm=false'
......@@ -16,6 +16,10 @@ case "$1" in
build | '')
echo docker build "$optRm" -t "$imageName" .
exec docker build "$optRm" -t "$imageName" .
echo docker build "$optRm" -t "${imageName}:onbuild" -f Dockerfile.onbuild .
exec docker build "$optRm" -t "${imageName}:onbuild" -f Dockerfile.onbuild .
ret=$?
;;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册