mirror of https://github.com/status-im/go-waku.git
Dockerfile: add commit, log format, and make target (#83)
Also fixed `.dockerignore` file and removed unnecessary symlinking. Related to: https://github.com/status-im/infra-go-waku Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
c86db00285
commit
21aba7cd65
|
@ -1,7 +1,7 @@
|
|||
/README.md
|
||||
/Dockerfile
|
||||
/.*ignore
|
||||
/LICENSE*
|
||||
/tests
|
||||
/examples
|
||||
/*.db
|
||||
README.md
|
||||
Dockerfile
|
||||
.*ignore
|
||||
LICENSE*
|
||||
tests
|
||||
examples
|
||||
*.db
|
||||
|
|
17
Dockerfile
17
Dockerfile
|
@ -8,24 +8,27 @@ WORKDIR /app
|
|||
COPY . .
|
||||
|
||||
# Build the final node binary
|
||||
RUN make -j$(nproc) $MAKE_TARGET
|
||||
RUN make -j$(nproc) build
|
||||
|
||||
# ACTUAL IMAGE -------------------------------------------------------
|
||||
|
||||
FROM alpine:3.12
|
||||
|
||||
ARG GIT_COMMIT=unknown
|
||||
|
||||
LABEL maintainer="richard@status.im"
|
||||
LABEL source="https://github.com/status-im/go-waku"
|
||||
LABEL description="go-waku: Waku V2 node"
|
||||
LABEL commit=$GIT_COMMIT
|
||||
|
||||
# color, nocolor, json
|
||||
ENV GOLOG_LOG_FMT=nocolor
|
||||
|
||||
# go-waku default port
|
||||
EXPOSE 9000
|
||||
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
|
||||
COPY --from=builder /app/build/waku /usr/bin/waku
|
||||
|
||||
ENTRYPOINT ["/usr/bin/waku"]
|
||||
# By default just show help if called without arguments
|
||||
CMD ["--help"]
|
||||
CMD ["--help"]
|
||||
|
|
9
Makefile
9
Makefile
|
@ -22,4 +22,11 @@ test:
|
|||
go test -v -failfast ./...
|
||||
|
||||
generate:
|
||||
go generate ./waku/v2/protocol/pb/generate.go
|
||||
go generate ./waku/v2/protocol/pb/generate.go
|
||||
|
||||
# build a docker image for the fleet
|
||||
docker-image: DOCKER_IMAGE_TAG ?= latest
|
||||
docker-image: DOCKER_IMAGE_NAME ?= statusteam/go-waku:$(DOCKER_IMAGE_TAG)
|
||||
docker-image:
|
||||
docker build --tag $(DOCKER_IMAGE_NAME) \
|
||||
--build-arg="GIT_COMMIT=$(shell git rev-parse HEAD)" .
|
||||
|
|
Loading…
Reference in New Issue