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

fix tsconfig & chromedriver in Alpine Linux

上级 482f3434
...@@ -22,13 +22,16 @@ RUN apk update && apk upgrade \ ...@@ -22,13 +22,16 @@ RUN apk update && apk upgrade \
RUN mkdir /wechaty RUN mkdir /wechaty
WORKDIR /wechaty WORKDIR /wechaty
# npm `chromedriver` not support alpine linux
# https://github.com/giggio/node-chromedriver/issues/70
COPY package.json . COPY package.json .
RUN npm --progress=false install > /dev/null \ RUN sed -i '/chromedriver/d' package.json \
&& npm --progress=false install -g yarn > /dev/null \ && npm --progress=false install > /dev/null \
&& rm -fr /tmp/* && rm -fr /tmp/*
COPY . . COPY . .
RUN npm --progress false link RUN sed -i '/chromedriver/d' package.json \
&& npm --progress=false link
# Loading from node_modules Folders: https://nodejs.org/api/modules.html # Loading from node_modules Folders: https://nodejs.org/api/modules.html
# If it is not found there, then it moves to the parent directory, and so on, until the root of the file system is reached. # If it is not found there, then it moves to the parent directory, and so on, until the root of the file system is reached.
......
...@@ -125,7 +125,8 @@ ...@@ -125,7 +125,8 @@
"ts-node": "^1.4.1", "ts-node": "^1.4.1",
"tslint": "^3.15.1", "tslint": "^3.15.1",
"tuling123-client": "0.0.1", "tuling123-client": "0.0.1",
"typescript": "^2.0.3" "typescript": "^2.0.3",
"yarn": "^0.16.1"
}, },
"files_comment__whitelist_npm_publish": "http://stackoverflow.com/a/8617868/1123955", "files_comment__whitelist_npm_publish": "http://stackoverflow.com/a/8617868/1123955",
"files": [ "files": [
......
...@@ -9,9 +9,11 @@ optRm='--rm' ...@@ -9,9 +9,11 @@ optRm='--rm'
[ -n "$CIRCLECI" ] && optRm='--rm=false' [ -n "$CIRCLECI" ] && optRm='--rm=false'
if [ "$1" = "build" ] || [ "$1" = "" ]; then if [ "$1" = "build" ] || [ "$1" = "" ]; then
echo docker build "$optRm" -t "$imageName" .
exec docker build "$optRm" -t "$imageName" . exec docker build "$optRm" -t "$imageName" .
exit $? exit $?
fi fi
echo docker run -ti "$optRm" -v /dev/shm:/dev/shm "$imageName" $@
exec docker run -ti "$optRm" -v /dev/shm:/dev/shm "$imageName" $@ exec docker run -ti "$optRm" -v /dev/shm:/dev/shm "$imageName" $@
exit $? exit $?
...@@ -27,5 +27,6 @@ ...@@ -27,5 +27,6 @@
, "example/**/*.ts" , "example/**/*.ts"
, "src/**/*.ts" , "src/**/*.ts"
, "test/**/*.spec.ts" , "test/**/*.spec.ts"
, "bot/**/*.ts"
] ]
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册