forked from signal18/replication-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (24 loc) · 833 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 alpine:3.4
# set env from golang container
ENV \
GOPATH="/go" \
PATH="/go/bin:/usr/local/go/bin:$PATH"
RUN mkdir -p /go/src/github.com/tanji/replication-manager
WORKDIR /go/src/github.com/tanji/replication-manager
COPY . /go/src/github.com/tanji/replication-manager/
RUN mkdir -p \
/go/bin \
/etc/replication-manager \
/usr/share/replication-manager/dashboard
RUN \
apk --no-cache --update add git go haproxy && \
go install github.com/tanji/replication-manager && \
apk --no-cache del git go && \
rm -rf /go/src /go/pkg && \
rm -rf /var/cache/apk/*
COPY etc/config.toml.sample /etc/replication-manager/
COPY dashboard /usr/share/replication-manager/dashboard/
WORKDIR /go/bin
ENTRYPOINT ["replication-manager"]
CMD ["monitor", "--daemon", "--http-server"]
EXPOSE 10001