feat: Improve Docker build (#3682)
parent
be7f93924a
commit
b53ba76a99
@ -1 +1,7 @@
|
||||
**/.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 GOPROXY https://goproxy.cn,direct
|
||||
|
||||
WORKDIR /app
|
||||
ADD goctl /usr/bin/goctl
|
||||
ADD cmd.sh .
|
||||
COPY goctl /usr/bin/
|
||||
COPY cmd.sh .
|
||||
|
||||
RUN chmod +x /usr/bin/goctl
|
||||
RUN chmod +x cmd.sh
|
||||
RUN chmod +x /usr/bin/goctl cmd.sh
|
||||
CMD ["/bin/bash", "cmd.sh"]
|
||||
|
Loading…
Reference in New Issue