diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..b41bfb90 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,7 @@ +/README.md +/Dockerfile +/.*ignore +/LICENSE* +/tests +/examples +/*.db diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..be2b8baa --- /dev/null +++ b/Dockerfile @@ -0,0 +1,31 @@ +# BUILD IMAGE -------------------------------------------------------- +FROM golang:1.15-alpine as builder + +# Get build tools and required header files +RUN apk add --no-cache build-base + +WORKDIR /app +COPY . . + +# Build the final node binary +RUN make -j$(nproc) $MAKE_TARGET + +# ACTUAL IMAGE ------------------------------------------------------- + +FROM alpine:3.12 + +LABEL maintainer="richard@status.im" +LABEL source="https://github.com/status-im/go-waku" +LABEL description="go-waku: Waku V2 node" + +# go-waku default port +EXPOSE 9000 + +COPY --from=builder /app/build/waku /usr/local/bin/ + +# Symlink the correct wakunode binary +RUN ln -sv /usr/local/bin/waku /usr/bin/waku + +ENTRYPOINT ["/usr/bin/waku"] +# By default just show help if called without arguments +CMD ["--help"] \ No newline at end of file diff --git a/README.md b/README.md index 47c01d3d..6db2fdac 100644 --- a/README.md +++ b/README.md @@ -4,21 +4,27 @@ A Go implementation of the [Waku v2 protocol](https://specs.vac.dev/specs/waku/v

- +

## Install + +#### Building from source ``` git clone https://github.com/status-im/go-waku cd go-waku make + +# See the available command line options with +./build/waku --help ``` -## Wakunode -See the available command line options with +#### Docker ``` -./build/waku --help +docker build -t go-waku:latest . + +docker run go-waku:latest --help ``` ## Library @@ -62,7 +68,7 @@ Thank you for considering to help out with the source code! We welcome contribut If you'd like to contribute to go-waku, please fork, fix, commit and send a pull request. If you wish to submit more complex changes though, please check up with the core devs first to ensure those changes are in line with the general philosophy of the project and/or get some early feedback which can make both your efforts much lighter as well as our review and merge procedures quick and simple. To build and test this repository, you need: - - [Go](https://golang.org/) (version 1.13 or later) + - [Go](https://golang.org/) (version 1.15 or later) - [protoc](https://grpc.io/docs/protoc-installation/) - [Protocol Buffers for Go with Gadgets](https://github.com/gogo/protobuf)