-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
44 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# BUILD IMAGE -------------------------------------------------------- | ||
ARG GO_VERSION=1.22 | ||
FROM golang:${GO_VERSION}-bookworm as builder | ||
|
||
WORKDIR /app | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y curl git jq | ||
|
||
RUN curl -L https://foundry.paradigm.xyz | bash && \ | ||
source ~/.bashrc && \ | ||
foundryup && \ | ||
cp ~/.foundry/bin/* /usr/local/bin | ||
|
||
COPY . . | ||
|
||
RUN dev/docker/anvil-background && \ | ||
dev/contracts/deploy-local && \ | ||
dev/register-local-node && \ | ||
dev/register-local-node-2 && \ | ||
sleep 5 | ||
|
||
# ACTUAL IMAGE ------------------------------------------------------- | ||
|
||
FROM debian:bookworm | ||
|
||
LABEL maintainer="engineering@xmtp.com" | ||
LABEL source="https://github.com/xmtp/xmtpd" | ||
LABEL description="XMTP Node Software" | ||
|
||
# color, nocolor, json | ||
ENV GOLOG_LOG_FMT=nocolor | ||
|
||
EXPOSE 5050 | ||
|
||
COPY --from=builder /usr/local/bin/anvil /usr/bin/ | ||
COPY --from=builder /app/anvil-baked-state anvil-baked-state | ||
|
||
CMD ["anvil", "--state", "anvil-baked-state"] |
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,3 @@ | ||
#!/bin/bash | ||
|
||
anvil -p 7545 --dump-state $PWD/anvil-baked-state & |