-
Notifications
You must be signed in to change notification settings - Fork 455
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
50 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,29 @@ | ||
{ | ||
"images": { | ||
"m3aggregator": { | ||
"dockerfile": "docker/m3aggregator/Dockerfile", | ||
"name": "m3aggregator" | ||
}, | ||
"m3coordinator": { | ||
"dockerfile": "docker/m3coordinator/Dockerfile", | ||
"name": "m3coordinator" | ||
}, | ||
"m3dbnode": { | ||
"name": "m3dbnode", | ||
"dockerfile": "docker/m3dbnode/Dockerfile" | ||
"dockerfile": "docker/m3dbnode/Dockerfile", | ||
"name": "m3dbnode" | ||
}, | ||
"m3dbnode-setcap": { | ||
"dockerfile": "docker/m3dbnode/Dockerfile-setcap", | ||
"name": "m3dbnode", | ||
"dockerfile": "docker/m3dbnode/Dockerfile", | ||
"tag_suffix": "setcap" | ||
}, | ||
"m3coordinator": { | ||
"name": "m3coordinator", | ||
"dockerfile": "docker/m3coordinator/Dockerfile" | ||
"m3nsch": { | ||
"dockerfile": "docker/m3nsch/Dockerfile", | ||
"name": "m3nsch" | ||
}, | ||
"m3query": { | ||
"name": "m3query", | ||
"dockerfile": "docker/m3query/Dockerfile" | ||
}, | ||
"m3nsch": { | ||
"name": "m3nsch", | ||
"dockerfile": "docker/m3nsch/Dockerfile" | ||
"dockerfile": "docker/m3query/Dockerfile", | ||
"name": "m3query" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# stage 1: build | ||
FROM golang:1.12-alpine AS builder | ||
LABEL maintainer="The M3DB Authors <[email protected]>" | ||
|
||
# Install Glide | ||
RUN apk add --update glide git make bash | ||
|
||
# Add source code | ||
RUN mkdir -p /go/src/github.com/m3db/m3 | ||
ADD . /go/src/github.com/m3db/m3 | ||
|
||
# Build m3dbnode binary | ||
RUN cd /go/src/github.com/m3db/m3/ && \ | ||
git submodule update --init && \ | ||
make m3dbnode-linux-amd64 | ||
|
||
# Stage 2: lightweight "release" | ||
FROM alpine:latest | ||
LABEL maintainer="The M3DB Authors <[email protected]>" | ||
|
||
EXPOSE 2379/tcp 2380/tcp 7201/tcp 7203/tcp 9000-9004/tcp | ||
|
||
COPY --from=builder /go/src/github.com/m3db/m3/src/dbnode/config/m3dbnode-local-etcd.yml /etc/m3dbnode/m3dbnode.yml | ||
COPY --from=builder /go/src/github.com/m3db/m3/bin/m3dbnode \ | ||
/go/src/github.com/m3db/m3/scripts/m3dbnode_bootstrapped.sh \ | ||
/bin/ | ||
|
||
# Use setcap to set +e "effective" and +p "permitted" to adjust the SYS_RESOURCE | ||
# so the process can raise the hard file limit with setrlimit. | ||
RUN apk add --no-cache curl jq libcap && \ | ||
setcap cap_sys_resource=+ep /bin/m3dbnode | ||
|
||
ENTRYPOINT [ "/bin/m3dbnode" ] | ||
CMD [ "-f", "/etc/m3dbnode/m3dbnode.yml" ] |