coder-enterprise-images/images/golang/Dockerfile.centos

16 lines
467 B
Docker

FROM codercom/enterprise-base:centos
# Run everything as root
USER root
# Install latest stable version of Go
RUN GOVERSION="$(curl --silent --show-error --location https://golang.org/VERSION?m=text)" && \
curl --silent --show-error --location "https://golang.org/dl/${GOVERSION}.linux-amd64.tar.gz" | \
tar -C /usr/local -xzvf -
# Set back to coder user
USER coder
# Ensure Go binaries are available
ENV PATH $PATH:/usr/local/go/bin:/home/coder/go/bin