diff --git a/Dockerfile b/Dockerfile index 82b944ec..d161ef1e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,7 +45,9 @@ RUN pip install scrapy pymongo bs4 requests crawlab-sdk scrapy-splash ADD . /app # copy backend files -COPY --from=backend-build /go/bin/crawlab /usr/local/bin +RUN mkdir -p /opt/bin +COPY --from=backend-build /go/bin/crawlab /opt/bin +RUN cp /opt/bin/crawlab /usr/local/bin/crawlab-server # copy frontend files COPY --from=frontend-build /app/dist /app/dist @@ -57,6 +59,10 @@ WORKDIR /app/backend # timezone environment ENV TZ Asia/Shanghai +# language environment +ENV LC_ALL C.UTF-8 +ENV LANG C.UTF-8 + # frontend port EXPOSE 8080 diff --git a/Dockerfile.local b/Dockerfile.local index ea4a1ff9..eb06b7e6 100644 --- a/Dockerfile.local +++ b/Dockerfile.local @@ -43,7 +43,9 @@ RUN pip install scrapy pymongo bs4 requests crawlab-sdk scrapy-splash -i https:/ ADD . /app # copy backend files -COPY --from=backend-build /go/bin/crawlab /usr/local/bin +RUN mkdir -p /opt/bin +COPY --from=backend-build /go/bin/crawlab /opt/bin +RUN cp /opt/bin/crawlab /usr/local/bin/crawlab-server # copy frontend files COPY --from=frontend-build /app/dist /app/dist @@ -55,6 +57,10 @@ WORKDIR /app/backend # timezone environment ENV TZ Asia/Shanghai +# language environment +ENV LC_ALL C.UTF-8 +ENV LANG C.UTF-8 + # frontend port EXPOSE 8080 diff --git a/docker_init.sh b/docker_init.sh index b65188b4..70c62031 100755 --- a/docker_init.sh +++ b/docker_init.sh @@ -33,4 +33,4 @@ fi ssh-keygen -q -t rsa -N "" -f ${HOME}/.ssh/id_rsa # start backend -crawlab \ No newline at end of file +crawlab-server \ No newline at end of file