-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
31 lines (23 loc) · 967 Bytes
/
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
FROM ubuntu
MAINTAINER James Hobin <[email protected]>
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y curl
RUN apt-get install -y git
# Install go, set up environment variables accordingly
RUN curl http://go.googlecode.com/files/go1.0.3.linux-amd64.tar.gz | tar -xz -C /usr/local
ENV GOROOT /usr/local/go
ENV PATH $PATH:/usr/local/go/bin
# Clone haven and its dependencies
RUN mkdir -p /haven/src/github.com/hobinjk
RUN git clone https://github.com/hobinjk/haven /haven/src/github.com/hobinjk/haven
ENV GOPATH /haven
RUN go get github.com/golang/groupcache/lru
RUN cd $GOPATH/src/github.com/hobinjk/haven && go build
# Expose the server port
EXPOSE 9001
# Set the working directory to the location of the executable
WORKDIR /haven/src/github.com/hobinjk/haven
# start the container with sudo docker run -d -p 9001:9001 hobinjk/haven
CMD ["./haven"]