-
Notifications
You must be signed in to change notification settings - Fork 15
/
Dockerfile
43 lines (40 loc) · 1.08 KB
/
Dockerfile
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM ubuntu:17.10
ENV ROOT_DIR /
WORKDIR ${ROOT_DIR}
ENV HOME /root
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections \
&& apt-get -y update \
&& apt-get -y install \
build-essential \
gcc \
apt-utils \
software-properties-common \
curl \
python \
git \
tar \
bash \
apt-transport-https \
libssl-dev \
&& rm /bin/sh \
&& ln -s /bin/bash /bin/sh \
&& ls -l $(which bash) \
&& echo "root ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers \
&& apt-get -y clean \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get -y update \
&& apt-get -y upgrade \
&& apt-get -y dist-upgrade \
&& apt-get -y update \
&& apt-get -y upgrade \
&& apt-get -y autoremove \
&& apt-get -y autoclean
ENV GOROOT /usr/local/go
ENV GOPATH /go
ENV PATH ${GOPATH}/bin:${GOROOT}/bin:${PATH}
ENV GO_VERSION REPLACE_ME_GO_VERSION
ENV GO_DOWNLOAD_URL https://storage.googleapis.com/golang
RUN rm -rf ${GOROOT} \
&& curl -s ${GO_DOWNLOAD_URL}/go${GO_VERSION}.linux-amd64.tar.gz | tar -v -C /usr/local/ -xz \
&& mkdir -p ${GOPATH}/src ${GOPATH}/bin \
&& go version