Skip to content

Commit

Permalink
fix: update go version in Dockerfile and fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
niconical committed Jun 7, 2023
1 parent 8751cd8 commit affc4fd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
30 changes: 18 additions & 12 deletions scripts/docker/kclvm-builder-centos8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,31 @@ RUN yum -y install llvm-devel
RUN yum -y install libffi-devel
RUN ln -s /usr/lib64/libtinfo.so.6 /usr/lib64/libtinfo.so

# Go 1.6
RUN yum -y install golang
RUN go version
# golang 1.19+
RUN mkdir -p /root/download && cd /root/download \
&& wget https://dl.google.com/go/go1.20.5.linux-amd64.tar.gz \
&& tar -zxvf go1.20.5.linux-amd64.tar.gz \
&& mv ./go /usr/local/go1.20.5
RUN ln -sf /usr/local/go1.20.5/bin/go /usr/bin/go
RUN rm -rf /root/download

# /usr/lib64/python3.9
RUN yum -y install python39-devel
RUN python3 -m pip install pytest
ENV GOPATH=/go
ENV GOLANG_VERSION=1.20.5

# golang apps
RUN go get golang.org/x/lint/golint
RUN go get golang.org/x/tools/cmd/goimports
#RUN go get honnef.co/go/tools/cmd/...
RUN go install golang.org/x/lint/golint@latest
RUN go install golang.org/x/tools/cmd/goimports@latest
# RUN go install honnef.co/go/tools/cmd/...@latest

RUN go get github.com/t-yuki/gocover-cobertura
RUN go get github.com/jstemmer/go-junit-report
RUN go install github.com/t-yuki/gocover-cobertura@latest
RUN go install github.com/jstemmer/go-junit-report@latest

RUN rm -rf /go/pkg/mod
RUN rm -rf /go/pkg/sumdb

# /usr/lib64/python3.9
RUN yum -y install python39-devel
RUN python3 -m pip install pytest

RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' >/etc/timezone

Expand Down
2 changes: 1 addition & 1 deletion scripts/docker/kclvm-builder-centos8/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ publish-builder:
@echo "push ${BUILDER_IMAGE} ok"

sh-in-builder:
${RUN_IN_DOCKER} -v ${PWD}/../..:/root/kclvm -w /root ${BUILDER_IMAGE} bash
${RUN_IN_DOCKER} -v ${PWD}/../../..:/root/kclvm -w /root ${BUILDER_IMAGE} bash

clean:

0 comments on commit affc4fd

Please sign in to comment.