8000 Update klaytn_base image golang from 1.18 to 1.20.6 by Sotatek-TinnNguyen · Pull Request #1898 · klaytn/klaytn · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Aug 19, 2024. It is now read-only.

Update klaytn_base image golang from 1.18 to 1.20.6 #1898

Merged
merged 3 commits into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions build/Dockerfile-go1.20.6-rpmbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM centos:centos7

RUN curl https://dl.google.com/go/go1.20.6.linux-amd64.tar.gz | tar xzvf - -C /usr/local
RUN yum install -y make rpm-build git createrepo python3 gcc unzip
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && unzip awscliv2.zip && ./aws/install && rm awscliv2.zip
ENV PATH=$PATH:/usr/local/go/bin

CMD ["/bin/sh"]
40 changes: 40 additions & 0 deletions build/Dockerfile-go1.20.6-solc0.8.13-ubuntu
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
FROM ubuntu:20.04 as solc_0.8.13_builder
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Asia/Seoul
RUN apt update
RUN apt install -yq tzdata && \
ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime && \
dpkg-reconfigure -f noninteractive tzdata
RUN apt install -y git lsb-core sudo libboost-all-dev build-essential cmake z3
RUN git clone --depth 1 --recursive -b v0.8.13 https://github.com/ethereum/solidity
RUN cd /solidity && cmake -DCMAKE_BUILD_TYPE=Release -DTESTS=0 -DSTATIC_LINKING=1
RUN cd /solidity && touch prerelease.txt
RUN cd /solidity && make solc
RUN cd /solidity && install -s solc/solc /usr/bin

FROM ubuntu:20.04 as go_builder
RUN apt update && apt install -y software-properties-common
RUN add-apt-repository ppa:longsleep/golang-backports -y && \
apt install -yq tzdata && \
ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime && \
dpkg-reconfigure -f noninteractive tzdata
RUN apt install -y build-essential bash gcc musl-dev openssl wget golang golang-1.17
RUN wget -O go.src.tar.gz https://dl.google.com/go/go1.20.6.src.tar.gz
RUN tar -C /usr/local -xzf go.src.tar.gz
RUN cd /usr/local/go/src/ && \
./make.bash

FROM ubuntu:20.04
RUN apt update
RUN apt install -yq tzdata && \
ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime && \
dpkg-reconfigure -f noninteractive tzdata
RUN apt install -y ca-certificates libboost-all-dev git make gcc libc-dev curl bash python3 python3-dev python3-pip unzip
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && unzip awscliv2.zip && ./aws/install && rm awscliv2.zip
COPY --from=solc_0.8.13_builder /usr/bin/solc /usr/bin/solc
COPY --from=go_builder /usr/local/go /usr/local

ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.52.0
0