mirror of https://github.com/mindoc-org/mindoc.git
完善Dockerfile
parent
2e90763493
commit
0a29049440
13
Dockerfile
13
Dockerfile
|
@ -1,4 +1,4 @@
|
||||||
FROM golang:1.8.3-alpine3.6
|
FROM golang:1.9.3-alpine3.6
|
||||||
|
|
||||||
# add china aliyun repo 新增了 alpine 3.6 的阿里源
|
# add china aliyun repo 新增了 alpine 3.6 的阿里源
|
||||||
RUN cp /etc/apk/repositories /etc/apk/repositories.back && \
|
RUN cp /etc/apk/repositories /etc/apk/repositories.back && \
|
||||||
|
@ -13,7 +13,10 @@ WORKDIR /go/src/github.com/lifei6671/mindoc
|
||||||
|
|
||||||
RUN chmod +x start.sh
|
RUN chmod +x start.sh
|
||||||
|
|
||||||
#RUN go get -d ./... && \ # 这行 docker build 不过去,所以注释掉了
|
RUN go get -d ./... && \
|
||||||
RUN go get github.com/mitchellh/gox && \
|
CGO_ENABLE=1 go build -v -o mindoc_linux_amd64 -ldflags="-w -X main.VERSION=$TAG -X 'main.BUILD_TIME=`date`' -X 'main.GO_VERSION=`go version`'" && \
|
||||||
gox -os "windows linux darwin" -arch amd64
|
rm -rf commands controllers models modules routers tasks vendor docs search data utils graphics .git Godeps uploads/* .gitignore .travis.yml Dockerfile gide.yaml LICENSE main.go README.md conf/enumerate.go conf/mail.go install.lock
|
||||||
CMD ["./start.sh"]
|
|
||||||
|
WORKDIR /go/src/github.com/lifei6671/mindoc
|
||||||
|
|
||||||
|
CMD ["./start.sh"]
|
Loading…
Reference in New Issue