Skip to content

Commit

Permalink
Moving Go (which is frequenly updated) to the end, so it does not inv…
Browse files Browse the repository at this point in the history
…alidate everything else.
  • Loading branch information
xiam committed Jan 11, 2016
1 parent 1bcaa82 commit 2159f48
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,11 @@
FROM fedora:21
MAINTAINER "The Lantern Team" <[email protected]>

ENV GO_VERSION go1.5
ENV GOROOT /usr/local/go
ENV GOPATH /

ENV PATH $PATH:$GOROOT/bin

ENV WORKDIR /lantern
ENV SECRETS /secrets

# Go binary for bootstrapping.
ENV GO_PACKAGE_URL https://storage.googleapis.com/golang/go1.5.2.linux-amd64.tar.gz
RUN mkdir -p $WORKDIR
RUN mkdir -p $SECRETS

# Updating system.
RUN yum update -y && yum makecache && yum clean packages
Expand All @@ -26,9 +20,6 @@ RUN yum install -y git tar gzip curl hostname && yum clean packages
# Compilers and tools for CGO.
RUN yum install -y gcc gcc-c++ libgcc.i686 gcc-c++.i686 pkg-config && yum clean packages

# Getting Go.
RUN curl -sSL $GO_PACKAGE_URL | tar -xvzf - -C /usr/local

# Requisites for bootstrapping.
RUN yum install -y glibc-devel glibc-static && yum clean packages
RUN yum install -y glibc-devel.i686 glib2-static.i686 glibc-2.20-8.fc21.i686 libgcc.i686 && yum clean packages
Expand Down Expand Up @@ -65,8 +56,15 @@ RUN yum install -y bzip2 && yum clean packages
RUN yum install -y nodejs npm && yum clean packages
RUN npm install -g gulp

RUN mkdir -p $WORKDIR
RUN mkdir -p $SECRETS
# Getting Go.
ENV GO_VERSION go1.5.2
ENV GOROOT /usr/local/go
ENV GOPATH /

ENV PATH $PATH:$GOROOT/bin

ENV GO_PACKAGE_URL https://storage.googleapis.com/golang/$GO_VERSION.linux-amd64.tar.gz
RUN curl -sSL $GO_PACKAGE_URL | tar -xvzf - -C /usr/local

# Expect the $WORKDIR volume to be mounted.
VOLUME [ "$WORKDIR" ]
Expand Down

0 comments on commit 2159f48

Please sign in to comment.