add debug
This commit is contained in:
105
op/Dockerfile.debug
Normal file
105
op/Dockerfile.debug
Normal file
@@ -0,0 +1,105 @@
|
||||
FROM node:20 as nodebuild
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
curl \
|
||||
jq \
|
||||
python3 \
|
||||
ca-certificates \
|
||||
git \
|
||||
g++ \
|
||||
make \
|
||||
gcc \
|
||||
musl-dev \
|
||||
bash \
|
||||
# the following 4 deps are needed for node-hid
|
||||
# which is a deep sub dependency of ethers to install
|
||||
# correctly
|
||||
pkg-config \
|
||||
libusb-1.0-0-dev \
|
||||
libudev-dev \
|
||||
--no-install-recommends
|
||||
|
||||
|
||||
# Clone the repository and checkout the specific commit
|
||||
ENV OP_NODE_REPO=https://github.com/ethereum-optimism/optimism.git
|
||||
ARG OP_NODE_VERSION
|
||||
ARG OP_NODE_COMMIT
|
||||
RUN git clone $OP_NODE_REPO --branch op-node/$OP_NODE_VERSION --single-branch . && \
|
||||
git switch -c branch-$OP_NODE_VERSION && \
|
||||
bash -c '[ "$(git rev-parse HEAD)" = "$OP_NODE_COMMIT" ]'
|
||||
|
||||
# Install pnpm
|
||||
RUN npm install -g pnpm && \
|
||||
curl -L https://foundry.paradigm.xyz | bash
|
||||
|
||||
ENV PATH="${PATH}:/root/.foundry/bin"
|
||||
RUN /root/.foundry/bin/foundryup
|
||||
|
||||
# Assuming the op-node project is located at the root of the repository
|
||||
# Install dependencies and build the project
|
||||
RUN cd op-node && pnpm install && pnpm build && ls
|
||||
|
||||
|
||||
# Now, switch to the Golang image for the rest of the operations
|
||||
FROM golang:1.21 as op-node
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the op-node project's source code and build artifacts
|
||||
COPY --from=nodebuild /app /app
|
||||
|
||||
RUN cd op-node && ls && \
|
||||
make op-node
|
||||
|
||||
|
||||
FROM golang:1.21 as op-wheel
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the op-node project's source code and build artifacts
|
||||
COPY --from=nodebuild /app /app
|
||||
|
||||
RUN cd op-wheel && \
|
||||
make op-wheel
|
||||
|
||||
FROM golang:1.21 as geth
|
||||
|
||||
WORKDIR /app
|
||||
ENV OP_GETH_REPO=https://github.com/ethereum-optimism/op-geth.git
|
||||
ARG OP_GETH_VERSION
|
||||
ARG OP_GETH_COMMIT
|
||||
|
||||
# avoid depth=1, so the geth build can read tags
|
||||
RUN git clone $OP_GETH_REPO --branch $OP_GETH_VERSION --single-branch . && \
|
||||
git switch -c branch-$OP_GETH_VERSION && \
|
||||
bash -c '[ "$(git rev-parse HEAD)" = "$OP_GETH_COMMIT" ]'
|
||||
|
||||
RUN go run build/ci.go install -static ./cmd/geth
|
||||
|
||||
FROM golang:1.21
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y jq curl supervisor && \
|
||||
rm -rf /var/lib/apt/lists
|
||||
RUN mkdir -p /var/log/supervisor
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=op-node /app/op-node/bin/ ./
|
||||
COPY --from=op-node /app/op-node/bin/ /bin/
|
||||
#run mkdir op-n
|
||||
#COPY --from=op-node / ./op-n
|
||||
run mkdir op-w
|
||||
COPY --from=op-wheel /app/op-wheel/ ./op-w
|
||||
COPY --from=geth /app/build/bin/geth ./
|
||||
COPY --from=geth /app/build/bin/geth /bin/
|
||||
# COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
COPY geth-entrypoint .
|
||||
COPY op-node-entrypoint .
|
||||
COPY goerli ./goerli
|
||||
COPY sepolia ./sepolia
|
||||
COPY mainnet ./mainnet
|
||||
|
||||
# CMD ["/usr/bin/supervisord"]
|
||||
Reference in New Issue
Block a user