Skip to content

Instantly share code, notes, and snippets.

@challapradyumna
Created April 23, 2021 17:53
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save challapradyumna/6f725829063273f180b7ed21c5f7d7a4 to your computer and use it in GitHub Desktop.
Save challapradyumna/6f725829063273f180b7ed21c5f7d7a4 to your computer and use it in GitHub Desktop.
Build DGraph for ARM processor
ARG GOLANG=1.13.8-buster
FROM golang:${GOLANG} as builder
RUN apt-get update && apt-get install -qy build-essential software-properties-common gcc make sudo
ENV CGO_ENABLED=1 GOOS=linux GOARCH=arm64
RUN go get -u -v google.golang.org/grpc && \
git clone --depth 1 --branch v20.07.2 https://www.github.com/dgraph-io/dgraph/ && \
cd dgraph && \
make dgraph
RUN mkdir -p /dist/bin && \
mkdir -p /dist/tmp && \
mv dgraph/dgraph/dgraph /dist/bin/dgraph
FROM debian:buster-slim as dgraph
COPY --from=builder /dist /
ENV PATH=$PATH:/bin/
RUN chmod +x /bin/dgraph
# && apk --update --no-cache add bash
WORKDIR /bin
# Dgraph node type | gRPC-internal | gRPC-external | HTTP-external
# zero | 5080 | - | 6080
# alpha | 7080 | 9080 | 8080
# ratel | - | - | 8000
EXPOSE 5080 6080 7080 8080 8000 9080
CMD ["/bin/dgraph", "version"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment