-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (28 loc) · 959 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
33
34
FROM centos:centos7
ENV GO_VERSION go1.7.linux-amd64
ENV BROOD_ADDRESS 0.0.0.0
ENV BROOD_PORT 3456
COPY ceph.repo /etc/yum.repos.d/ceph.repo
RUN yum install -y epel-release && \
yum install -y ceph && \
yum autoremove -y && \
yum clean all
COPY . /usr/local/src/github.com/Buhrietoe/brood
RUN set -x && \
curl -sL https://storage.googleapis.com/golang/$GO_VERSION.tar.gz | tar -C /opt -xz && \
export PATH=$PATH:/opt/go/bin && \
export GOROOT=/opt/go && \
export GOPATH=/usr/local && \
cd /usr/local/src/github.com/Buhrietoe/brood && \
go build -v -o /usr/local/bin/brood main.go && \
rm -rf /opt/go /usr/local/pkg
RUN set -x && \
yum install -y npm nodejs-grunt-cli && \
cd /usr/local/src/github.com/Buhrietoe/brood/static && \
npm install && \
grunt build && \
yum remove -y npm nodejs-grunt-cli && \
yum autoremove -y && \
yum clean all
EXPOSE $BROOD_PORT
CMD [ "brood", "server" ]