1 Star 0 Fork 0

橙子/micro

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile-local 1.23 KB
一键复制 编辑 原始数据 按行查看 历史
Dominic Wong 提交于 2020-05-22 13:03 . Fix up versions of services for test
FROM alpine:latest
RUN apk --no-cache add make git go gcc libtool musl-dev curl
# Configure Go
ENV GOROOT /usr/lib/go
ENV GOPATH /go
ENV PATH /go/bin:$PATH
RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin
RUN apk add ca-certificates && \
rm -rf /var/cache/apk/* /tmp/* && \
[ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf
RUN apk add --update ca-certificates openssl tar && \
wget https://github.com/coreos/etcd/releases/download/v3.4.7/etcd-v3.4.7-linux-amd64.tar.gz && \
tar xzvf etcd-v3.4.7-linux-amd64.tar.gz && \
mv etcd-v3.4.7-linux-amd64/etcd* /bin/ && \
apk del --purge tar openssl && \
rm -Rf etcd-v3.4.7-linux-amd64* /var/cache/apk/*
VOLUME /data
EXPOSE 2379 2380 4001 7001
ADD scripts/run-etcd.sh /bin/run.sh
ENV MICRO_REGISTRY=etcd
COPY ./test/example-service ${GOPATH}/src/example-service
# Speeding up tests by predownloading dependencies for services used.
RUN cd ${GOPATH}/src/example-service && go get && \
go get github.com/micro/services/location && \
go get github.com/micro/services/helloworld
# RUN go get github.com/crufter/micro-services/logspammer
COPY ./micro /micro
ENTRYPOINT ["sh", "/bin/run.sh"]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xuchengzhi/micro.git
[email protected]:xuchengzhi/micro.git
xuchengzhi
micro
micro
master

搜索帮助