2017-06-21 18:00:36 +08:00
|
|
|
FROM golang:1.8.3-alpine3.6
|
2017-04-30 22:13:12 +08:00
|
|
|
|
2018-01-06 14:18:29 +08:00
|
|
|
# add china aliyun repo 新增了 alpine 3.6 的阿里源
|
|
|
|
RUN cp /etc/apk/repositories /etc/apk/repositories.back && \
|
|
|
|
echo "https://mirrors.aliyun.com/alpine/v3.6/main/" > /etc/apk/repositories && \
|
|
|
|
echo "https://mirrors.aliyun.com/alpine/v3.6/community/" >> /etc/apk/repositories
|
2017-04-30 22:13:12 +08:00
|
|
|
|
2017-06-21 18:10:16 +08:00
|
|
|
RUN apk add --update bash git make gcc g++
|
2017-05-01 13:11:33 +08:00
|
|
|
|
2018-01-06 15:43:39 +08:00
|
|
|
ADD . /go/src/github.com/lifei6671/mindoc
|
2017-04-30 22:13:12 +08:00
|
|
|
|
2018-01-06 15:43:39 +08:00
|
|
|
WORKDIR /go/src/github.com/lifei6671/mindoc
|
2017-04-30 22:13:12 +08:00
|
|
|
|
|
|
|
RUN chmod +x start.sh
|
2017-05-03 17:31:34 +08:00
|
|
|
|
2018-01-06 14:18:29 +08:00
|
|
|
#RUN go get -d ./... && \ # 这行 docker build 不过去,所以注释掉了
|
|
|
|
RUN go get github.com/mitchellh/gox && \
|
2017-06-21 18:00:36 +08:00
|
|
|
gox -os "windows linux darwin" -arch amd64
|
2017-06-21 16:26:55 +08:00
|
|
|
CMD ["./start.sh"]
|