diff --git a/hexo/Dockerfile b/hexo/Dockerfile index 007b779..87c0904 100644 --- a/hexo/Dockerfile +++ b/hexo/Dockerfile @@ -8,4 +8,6 @@ RUN npm install hexo-cli -g ADD bootstrap.sh /etc/bootstrap.sh +WORKDIR /blog + CMD ["/etc/bootstrap.sh", "development"] diff --git a/hexo/bootstrap.sh b/hexo/bootstrap.sh index f6c7c6a..95f8dba 100755 --- a/hexo/bootstrap.sh +++ b/hexo/bootstrap.sh @@ -5,8 +5,8 @@ git config --global user.email $GIT_EMAIL git config --global user.name $GIT_NAME # init hexo if dir is empty -if ! [ "$(ls -A blog)" ]; then - hexo init blog && npm install blog +if ! [ "$(ls -A ./ )" ]; then + hexo init && npm install fi # run hexo as production / developemnt mode