forked from Edgio/vflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (24 loc) · 928 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
31
32
FROM ubuntu:trusty
ENV GOPATH /root/go
ENV GO_VERSION 1.8
ENV GO_ARCH amd64
ENV PATH /usr/local/go/bin:$PATH
ENV PATH $GOPATH/bin:$PATH
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
wget \
git \
supervisor
# install Go 1.8
RUN wget -q https://storage.googleapis.com/golang/go${GO_VERSION}.linux-${GO_ARCH}.tar.gz; \
tar -C /usr/local/ -xf /go${GO_VERSION}.linux-${GO_ARCH}.tar.gz ; \
rm /go${GO_VERSION}.linux-${GO_ARCH}.tar.gz
RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin && chmod -R 777 ${GOPATH}
# build vFlow
RUN mkdir -p ${GOPATH}/src/github.com/VerizonDigital/vflow
ADD . ${GOPATH}/src/github.com/VerizonDigital/vflow
WORKDIR ${GOPATH}/src/github.com/VerizonDigital/vflow/vflow
RUN ["go", "get", "-d", "./..."]
RUN ["go", "build", "-o", "/usr/local/bin/vflow"]
ADD scripts/vflow.supervisor /etc/supervisor/conf.d/vflow.conf
EXPOSE 4739 6343 8081
CMD ["supervisord", "-n"]