feat: Improve Docker build (#3682)
parent
be7f93924a
commit
b53ba76a99
@ -1 +1,7 @@
|
|||||||
**/.git
|
**/.git
|
||||||
|
.dockerignore
|
||||||
|
Dockerfile
|
||||||
|
goctl
|
||||||
|
Makefile
|
||||||
|
readme.md
|
||||||
|
readme-cn.md
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
test/
|
||||||
|
.dockerignore
|
||||||
|
.go-version
|
||||||
|
Dockerfile
|
||||||
|
goctl
|
||||||
|
Makefile
|
||||||
|
readme.md
|
||||||
|
readme-cn.md
|
@ -1,12 +1,11 @@
|
|||||||
FROM golang:1.19
|
FROM golang:1.21-alpine
|
||||||
|
|
||||||
ENV TZ Asia/Shanghai
|
ENV TZ Asia/Shanghai
|
||||||
ENV GOPROXY https://goproxy.cn,direct
|
ENV GOPROXY https://goproxy.cn,direct
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ADD goctl /usr/bin/goctl
|
COPY goctl /usr/bin/
|
||||||
ADD cmd.sh .
|
COPY cmd.sh .
|
||||||
|
|
||||||
RUN chmod +x /usr/bin/goctl
|
RUN chmod +x /usr/bin/goctl cmd.sh
|
||||||
RUN chmod +x cmd.sh
|
|
||||||
CMD ["/bin/bash", "cmd.sh"]
|
CMD ["/bin/bash", "cmd.sh"]
|
||||||
|
Loading…
Reference in New Issue