-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.golang
27 lines (22 loc) · 967 Bytes
/
Dockerfile.golang
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Cloud9 server for glang dev
# A lot inspired by https://hub.docker.com/_/golang/ (near similar instruction but based on cloud9, GOPATH /workspace)
FROM dockerimages/cloud9
MAINTAINER Frank Lemanschik <[email protected]>
LABEL maintainer="Frank Lemanschik <[email protected]>"
# gcc for cgo
RUN apt-get update && apt-get install -y --no-install-recommends \
g++ \
gcc \
libc6-dev \
make \
&& rm -rf /var/lib/apt/lists/*
ENV GOLANG_VERSION 1.11.5
ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz
ENV GOLANG_DOWNLOAD_SHA256 2871270d8ff0c8c69f161aaae42f9f28739855ff5c5204752a8d92a1c9f63993
ENV GOPATH /workspace
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \
&& echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \
&& tar -C /usr/local -xzf golang.tar.gz \
&& echo 'export PATH=$GOPATH/bin:/usr/local/go/bin:$PATH' >> /root/.bashrc \
&& rm golang.tar.gz