2021-10-11 15:46:35 +00:00
|
|
|
# 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
|
2021-10-15 10:47:23 +00:00
|
|
|
RUN make -j$(nproc) build
|
2021-10-11 15:46:35 +00:00
|
|
|
|
|
|
|
# ACTUAL IMAGE -------------------------------------------------------
|
|
|
|
|
|
|
|
FROM alpine:3.12
|
|
|
|
|
2021-10-15 10:47:23 +00:00
|
|
|
ARG GIT_COMMIT=unknown
|
|
|
|
|
2021-10-11 15:46:35 +00:00
|
|
|
LABEL maintainer="richard@status.im"
|
|
|
|
LABEL source="https://github.com/status-im/go-waku"
|
|
|
|
LABEL description="go-waku: Waku V2 node"
|
2021-10-15 10:47:23 +00:00
|
|
|
LABEL commit=$GIT_COMMIT
|
2021-10-11 15:46:35 +00:00
|
|
|
|
2021-10-15 10:47:23 +00:00
|
|
|
# color, nocolor, json
|
|
|
|
ENV GOLOG_LOG_FMT=nocolor
|
2021-10-11 15:46:35 +00:00
|
|
|
|
2021-10-15 10:47:23 +00:00
|
|
|
# go-waku default port
|
|
|
|
EXPOSE 9000
|
2021-10-11 15:46:35 +00:00
|
|
|
|
2021-10-15 10:47:23 +00:00
|
|
|
COPY --from=builder /app/build/waku /usr/bin/waku
|
2021-10-11 15:46:35 +00:00
|
|
|
|
|
|
|
ENTRYPOINT ["/usr/bin/waku"]
|
|
|
|
# By default just show help if called without arguments
|
2021-10-15 10:47:23 +00:00
|
|
|
CMD ["--help"]
|