Skip to content
This repository was archived by the owner on May 2, 2025. It is now read-only.

Commit 1d9cf50

Browse files
authored
fix: dockerfile usage (#24)
Add docker-build Makefile command. Add usage instructions for binary and docker to README. Add ENTRYPOINT to dockerfile to enable handing of additional flags easier.
1 parent 6a6065f commit 1d9cf50

File tree

3 files changed

+56
-2
lines changed

3 files changed

+56
-2
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ COPY --from=build-env /src/main /usr/bin/local-sequencer
1818

1919
EXPOSE 50051
2020

21-
CMD ["local-sequencer", "-listen-all"]
21+
ENTRYPOINT ["local-sequencer"]
22+
CMD ["-listen-all"]

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,18 @@ pkgs := $(shell go list ./...)
88
run := .
99
count := 1
1010

11-
## build: Build local-da binary.
11+
## build: Build local-sequencer binary.
1212
build:
1313
@echo "--> Building local-sequencer"
1414
@go build -o build/ ${LDFLAGS} ./...
1515
.PHONY: build
1616

17+
## docker-build: Build local-sequencer docker image.
18+
docker-build:
19+
@echo "--> Building local-sequencer docker image"
20+
@docker build -t local-sequencer .
21+
.PHONY: docker-build
22+
1723
## help: Show this help message
1824
help: Makefile
1925
@echo " Choose a command run in "$(PROJECTNAME)":"

README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,53 @@ make test
5454
make lint
5555
```
5656

57+
## Local Sequencer
58+
59+
In this repo there is a mock `local-sequencer` server that implements the
60+
`go-sequencing` interface. This server is useful for testing and development
61+
purposes.
62+
63+
### Running the local sequencer binary
64+
65+
To run the mock `local-sequencer` server, run the following command:
66+
67+
```sh
68+
make build
69+
```
70+
71+
This will build the `local-sequencer` binary. To run the server, run:
72+
73+
```sh
74+
./build/local-sequencer
75+
```
76+
77+
You will see an output like the following:
78+
79+
```sh
80+
2024/11/13 10:56:01 Listening on: localhost:50051
81+
```
82+
83+
### Running the local sequencer in Docker
84+
85+
To run the mock `local-sequencer` server in Docker, run the following command:
86+
87+
```sh
88+
make docker-build
89+
```
90+
91+
This will build a `local-sequencer` Docker image. To run the server, run:
92+
93+
```sh
94+
docker run -p 50051:50051 --rm local-sequencer
95+
```
96+
97+
In order to connect your rollup to your local sequencer, you need to pass in the
98+
rollup ID by using the following command:
99+
100+
```sh
101+
docker run -p 50051:50051 --rm local-sequencer -listen-all -rollup-id=testing
102+
```
103+
57104
## Contributing
58105

59106
We welcome your contributions! Everyone is welcome to contribute, whether it's

0 commit comments

Comments
 (0)