diff --git a/.gitignore b/.gitignore index 723ef36..bf3465c 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -.idea \ No newline at end of file +.idea +/test diff --git a/Dockerfile b/Dockerfile index c75190d..4b38d23 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,10 @@ #使用alpine作为基础镜像 FROM node:current-alpine3.12 +# 设置时区为上海 +RUN apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ + && echo "Asia/Shanghai" > /etc/timezone \ + && apk del tzdata #拷贝公钥免密克隆仓库代码 COPY .ssh /root/.ssh #拷贝到容器里的密钥需要修改权限才能正常使用 diff --git a/run b/run index 3a601df..3229f30 100644 --- a/run +++ b/run @@ -1,3 +1,3 @@ #!/bin/sh #创建运行容器 -docker run --name test -p 3000:3000 -p 8080:8080 test:1.0 +docker run -dit --name test -p 3000:3000 -p 8080:8080 test:1.0