forked from dragonflyoss/dragonfly-archived
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.supernode
More file actions
23 lines (15 loc) · 816 Bytes
/
Dockerfile.supernode
File metadata and controls
23 lines (15 loc) · 816 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM golang:1.12.10-alpine as builder
WORKDIR /go/src/github.com/dragonflyoss/Dragonfly
RUN apk --no-cache add bash make gcc libc-dev git
COPY . /go/src/github.com/dragonflyoss/Dragonfly
# go build supernode.
# write the resulting executable to the dir /opt/dragonfly/df-supernode.
RUN make build-supernode && make install-supernode
FROM dragonflyoss/nginx:apline
RUN apk --no-cache add ca-certificates bash
COPY --from=builder /go/src/github.com/dragonflyoss/Dragonfly/hack/start-supernode.sh /root/start.sh
COPY --from=builder /go/src/github.com/dragonflyoss/Dragonfly/hack/supernode-nginx.conf /etc/nginx/nginx.conf
COPY --from=builder /opt/dragonfly/df-supernode/supernode /opt/dragonfly/df-supernode/supernode
# supernode will listen 8001,8002 in default.
EXPOSE 8001 8002
ENTRYPOINT ["/root/start.sh"]