mirror of
https://github.com/logos-messaging/logos-messaging-go.git
synced 2026-01-04 06:53:06 +00:00
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
|
README.md
|
||||||
/Dockerfile
|
Dockerfile
|
||||||
/.*ignore
|
.*ignore
|
||||||
/LICENSE*
|
LICENSE*
|
||||||
/tests
|
tests
|
||||||
/examples
|
examples
|
||||||
/*.db
|
*.db
|
||||||
|
|||||||
17
Dockerfile
17
Dockerfile
@ -8,24 +8,27 @@ WORKDIR /app
|
|||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Build the final node binary
|
# Build the final node binary
|
||||||
RUN make -j$(nproc) $MAKE_TARGET
|
RUN make -j$(nproc) build
|
||||||
|
|
||||||
# ACTUAL IMAGE -------------------------------------------------------
|
# ACTUAL IMAGE -------------------------------------------------------
|
||||||
|
|
||||||
FROM alpine:3.12
|
FROM alpine:3.12
|
||||||
|
|
||||||
|
ARG GIT_COMMIT=unknown
|
||||||
|
|
||||||
LABEL maintainer="richard@status.im"
|
LABEL maintainer="richard@status.im"
|
||||||
LABEL source="https://github.com/status-im/go-waku"
|
LABEL source="https://github.com/status-im/go-waku"
|
||||||
LABEL description="go-waku: Waku V2 node"
|
LABEL description="go-waku: Waku V2 node"
|
||||||
|
LABEL commit=$GIT_COMMIT
|
||||||
|
|
||||||
|
# color, nocolor, json
|
||||||
|
ENV GOLOG_LOG_FMT=nocolor
|
||||||
|
|
||||||
# go-waku default port
|
# go-waku default port
|
||||||
EXPOSE 9000
|
EXPOSE 9000
|
||||||
|
|
||||||
COPY --from=builder /app/build/waku /usr/local/bin/
|
COPY --from=builder /app/build/waku /usr/bin/waku
|
||||||
|
|
||||||
# Symlink the correct wakunode binary
|
|
||||||
RUN ln -sv /usr/local/bin/waku /usr/bin/waku
|
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/bin/waku"]
|
ENTRYPOINT ["/usr/bin/waku"]
|
||||||
# By default just show help if called without arguments
|
# 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 ./...
|
go test -v -failfast ./...
|
||||||
|
|
||||||
generate:
|
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…
x
Reference in New Issue
Block a user