forked from kkrt-labs/kakarot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add Dockerfile.cross and update Dockerfile rpc * update CI * update docker files * checkout + needs * fix typo * fix mkdir * remove all the mkdir * fix artifacts * add additional rust c compiler flags for mbdx * add manifest for cross * fix artifacts * remove extra checkout * fix the paths * update release CI * add building for docker image
- Loading branch information
Showing
8 changed files
with
157 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,12 +26,12 @@ lint: | |
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- shellcheck@0.9.0 | ||
- shellcheck@0.10.0 | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- trufflehog@3.68.5 | ||
- trufflehog@3.69.0 | ||
- [email protected] | ||
ignore: | ||
- linters: [ALL] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[build] | ||
pre-build = [ | ||
# rust-bindgen dependencies: llvm-dev libclang-dev (>= 5.0) clang (>= 5.0) | ||
"apt-get update && apt-get install -y --no-install-recommends llvm-dev libclang-6.0-dev clang-6.0", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
FROM --platform=$TARGETPLATFORM debian:bookworm | ||
|
||
# Filled by docker buildx | ||
ARG TARGETARCH | ||
|
||
# Install any necessary dependencies | ||
RUN apt-get update && \ | ||
apt-get -y upgrade && \ | ||
apt-get install -y libssl-dev ca-certificates tini curl && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Copy the built binary. This assumes that the binary | ||
# has already been compiled for the target architecture | ||
COPY ./bin/$TARGETARCH/kakarot-rpc /usr/local/bin/kakarot-rpc | ||
|
||
# Expose the port that the RPC server will run on | ||
EXPOSE 9545 | ||
EXPOSE 3030 | ||
|
||
# this is required to have exposing ports work from docker, the default is not this. | ||
ENV KAKAROT_RPC_URL="0.0.0.0:3030" | ||
|
||
# Add a health check to make sure the service is healthy | ||
HEALTHCHECK --interval=3s --timeout=5s --start-period=1s --retries=5 \ | ||
CMD curl --request POST \ | ||
--header "Content-Type: application/json" \ | ||
--data '{"jsonrpc": "2.0", "method": "eth_chainId", "id": 1}' http://${KAKAROT_RPC_URL} || exit 1 | ||
|
||
# Seen in https://github.com/eqlabs/pathfinder/blob/4ab915a830953ed6f02af907937b46cb447d9a92/Dockerfile#L120 - | ||
# Allows for passing args down to the underlying binary easily | ||
ENTRYPOINT ["/usr/bin/tini", "--", "/usr/local/bin/kakarot-rpc"] | ||
|
||
# empty CMD is needed and cannot be --help because otherwise configuring from | ||
# environment variables only would be impossible and require a workaround. | ||
CMD [] |