FROM registry.jetbrains.team/p/prj/containers/projector-goland
RUN sudo chmod -R 777 /home &&  cd $HOME \
    && sudo apt-get update && sudo apt-get install wget -y && sudo apt-get install build-essential -y \
    && sudo wget https://go.dev/dl/go1.18.3.linux-amd64.tar.gz \
    && sudo tar -C /usr/local -zxvf go1.18.3.linux-amd64.tar.gz \
    && sudo rm -rf go1.18.3.linux-amd64.tar.gz


ENV PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/usr/local/go/bin:$PATH 
ENV GOPATH /home
ENV GOROOT /usr/local/go

RUN sudo chmod -R 777 /usr/local/go && cd /usr/local/go/src/ \
    && go env -w GOPROXY=https://goproxy.cn,direct 
