From a441cfe09f9bdaa15651d9cc9fced4241539adc5 Mon Sep 17 00:00:00 2001 From: Matthew Sevey <15232757+MSevey@users.noreply.github.com> Date: Wed, 13 Nov 2024 14:29:23 -0500 Subject: [PATCH] chore: add documentation for docker image --- Dockerfile | 3 ++- Makefile | 6 ++++++ README.md | 13 +++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ee550c9..9a1d0f7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,4 +18,5 @@ COPY --from=build-env /src/main /usr/bin/local-da EXPOSE 7980 -CMD ["local-da", "-listen-all"] +ENTRYPOINT ["local-da"] +CMD ["-listen-all"] diff --git a/Makefile b/Makefile index a3eaea8..643fefa 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,12 @@ build: @go build -o build/ ${LDFLAGS} ./... .PHONY: build +## docker-build: Build local-da docker image. +docker-build: + @echo "--> Building local-da docker image" + @docker build -t local-da . +.PHONY: docker-build + ## help: Show this help message help: Makefile @echo " Choose a command run in "$(PROJECTNAME)":" diff --git a/README.md b/README.md index 74d1803..f6c6f78 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,10 @@ It is intended to be used for testing DA layers without having to set up the act ## Usage +### local-da binary + +To build and run the local-da binary: + ```sh make build ./build/local-da @@ -26,6 +30,15 @@ $ ./build/local-da -listen-all 2024/04/11 12:23:34 Listening on: 0.0.0.0:7980 ``` +### Docker + +You can also run the local-da service using docker: + +```sh +make docker-build +docker run --rm -p 7980:7980 local-da +``` + ### MaxBlobSize ```sh