mirror of https://github.com/zhufuyi/sponge
17 lines
542 B
Plaintext
17 lines
542 B
Plaintext
# Need to package the code first `tar zcf serverNameExample.tar.gz $(ls)` and move it to the same directory as Dokerfile
|
|
# rpc server source code, used to test rpc methods
|
|
FROM golang:1.23-alpine
|
|
MAINTAINER zhufuyi "g.zhufuyi@gmail.com"
|
|
|
|
# go test dependency packages
|
|
RUN apk add bash alpine-sdk build-base gcc
|
|
|
|
COPY . /go/src/serverNameExample
|
|
WORKDIR /go/src/serverNameExample
|
|
RUN tar zxf serverNameExample.tar.gz
|
|
RUN go env -w GOPROXY=https://goproxy.cn,direct
|
|
RUN go mod download
|
|
RUN rm -f serverNameExample.tar.gz
|
|
|
|
CMD ["sleep","86400"]
|