summaryrefslogtreecommitdiff
path: root/registry-browser/Dockerfile
blob: d3859bd58c5a0bbca54d4a95fd16631ae2f2be93 (plain)
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
FROM ubuntu:14.04
RUN apt-get update
RUN apt-get install -y build-essential git wget curl mercurial

RUN mkdir /goproj

ENV GOPATH=/goproj
ENV PATH=/goproj/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

# install golang from source
RUN wget -qO- https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz | tar -C /usr/local -xzf -

# create gopath directories
RUN mkdir -p /goproj
RUN mkdir -p /goproj/bin
RUN mkdir -p /goproj/pkg
RUN mkdir -p /goproj/src/linaro.org/docker-registry-browser

# get dependencies
RUN go get github.com/gorilla/mux

# Copy the local package files to the container's workspace.
ADD . /goproj/src/linaro.org/docker-registry-browser

WORKDIR /goproj/src/linaro.org/docker-registry-browser
RUN go install .

# Run the golang server app when the container starts.
ENTRYPOINT /goproj/bin/docker-registry-browser -registry=https://registry

# Document that the service listens on port 8080.
EXPOSE 8080