增加docker文档

pull/109/head
ouqiang 2018-07-08 22:43:31 +08:00
parent 1ce41448c2
commit 43c267784d
3 changed files with 28 additions and 1 deletions

View File

@ -14,10 +14,12 @@ RUN make install-vue \
FROM alpine:3.7
RUN apk add --no-cache ca-certificates \
RUN apk add --no-cache ca-certificates tzdata \
&& addgroup -S app \
&& adduser -S -g app app
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
WORKDIR /app
COPY --from=builder /go/src/github.com/ouqiang/gocron/bin/gocron .

19
Dockerfile.release Normal file
View File

@ -0,0 +1,19 @@
FROM alpine:3.7
RUN apk add --no-cache ca-certificates tzdata \
&& addgroup -S app \
&& adduser -S -g app app
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
WORKDIR /app
COPY gocron .
RUN chown -R app:app ./
EXPOSE 5920
USER app
ENTRYPOINT ["/app/gocron", "web"]

View File

@ -63,6 +63,12 @@
* gocron `./bin/gocron web`
* gocron-node `./bin/gocron-node`
### docker
```shell
docker run --name gocron -p 5920:5920 -d ouqg/gocron
```
### 开发
1. 安装Go1.9+, Node.js, Yarn