mirror of https://github.com/status-im/go-waku.git
feat: add dockerfile
This commit is contained in:
parent
578b40a44e
commit
6f730abd38
|
@ -0,0 +1,7 @@
|
|||
/README.md
|
||||
/Dockerfile
|
||||
/.*ignore
|
||||
/LICENSE*
|
||||
/tests
|
||||
/examples
|
||||
/*.db
|
|
@ -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"]
|
16
README.md
16
README.md
|
@ -4,21 +4,27 @@ A Go implementation of the [Waku v2 protocol](https://specs.vac.dev/specs/waku/v
|
|||
<p align="left">
|
||||
<a href="https://goreportcard.com/report/github.com/status-im/go-waku"><img src="https://goreportcard.com/badge/github.com/status-im/go-waku" /></a>
|
||||
<a href="https://godoc.org/github.com/status-im/go-waku"><img src="http://img.shields.io/badge/godoc-reference-5272B4.svg?style=flat-square" /></a>
|
||||
<a href=""><img src="https://img.shields.io/badge/golang-%3E%3D1.13.0-orange.svg?style=flat-square" /></a>
|
||||
<a href=""><img src="https://img.shields.io/badge/golang-%3E%3D1.15.0-orange.svg?style=flat-square" /></a>
|
||||
<br>
|
||||
</p>
|
||||
|
||||
## 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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue