添加 'CloudNative/Kubernetes/Docs/cicd/go-Dockerfile.md'
This commit is contained in:
parent
a5b6ba8c73
commit
6a3e02607c
1 changed files with 19 additions and 0 deletions
19
CloudNative/Kubernetes/Docs/cicd/go-Dockerfile.md
Normal file
19
CloudNative/Kubernetes/Docs/cicd/go-Dockerfile.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
```bash
|
||||
cat > Dockerfile <<EOF
|
||||
FROM swr.cn-east-3.myhuaweicloud.com/turingsyn/jenkins/inbound-agent:kd-20230911
|
||||
USER root
|
||||
ADD go1.19.13.linux-amd64.tar.gz /usr/local
|
||||
ENV GOROOT=/usr/local/go GOPATH=/home/jenkins/go PATH=/usr/local/go/bin:$PATH
|
||||
RUN sed -i 's#deb.debian.org#mirrors.aliyun.com#g' /etc/apt/sources.list.d/debian.sources && \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends make protobuf-compiler git ca-certificates && \
|
||||
rm -rf /var/lib/apt/lists/ && \
|
||||
apt-get autoremove -y && \
|
||||
apt-get autoclean -y
|
||||
|
||||
# jenkins
|
||||
USER jenkins
|
||||
RUN go env -w GO111MODULE=on && \
|
||||
go env -w GOPROXY=https://goproxy.io,direct
|
||||
EOF
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue