Skip to content

Commit

Permalink
fix Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
barnabasbusa committed Jun 3, 2024
1 parent e947433 commit a97c444
Showing 1 changed file with 6 additions and 36 deletions.
42 changes: 6 additions & 36 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Stage 1: Builder
FROM debian:latest AS builder
# Use the Debian base image for broader compatibility
FROM debian:latest

# Install dependencies
# Install dependencies using apt
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
make \
Expand Down Expand Up @@ -49,39 +49,6 @@ RUN git clone https://github.com/ethereum-optimism/optimism.git && \
#make op-node op-batcher op-proposer && \
pnpm build

# Stage 2: Runner
FROM debian:latest

# Install runtime dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
bash \
ca-certificates \
jq \
direnv \
curl \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# Copy Go from the builder stage
COPY --from=builder /usr/local/go/ /usr/local/go/
ENV PATH="/usr/local/go/bin:${PATH}"

# Copy pnpm from the builder stage
COPY --from=builder /usr/local/lib/node_modules/pnpm /usr/local/lib/node_modules/pnpm
COPY --from=builder /usr/local/bin/pnpm /usr/local/bin/pnpm

# Copy web3 cli from the builder stage
COPY --from=builder /usr/local/bin/web3 /usr/local/bin/web3

# Copy Rust and Foundry from the builder stage
COPY --from=builder /root/.cargo /root/.cargo
ENV PATH="/root/.cargo/bin:${PATH}"

# Copy the built application from the builder stage
COPY --from=builder /workspace/optimism /workspace/optimism

# Set the working directory
WORKDIR /workspace/optimism

# Verify installed versions
RUN git --version && \
go version && \
Expand All @@ -93,5 +60,8 @@ RUN git --version && \
jq --version && \
direnv --version

# Set the working directory
WORKDIR /workspace/optimism

# Default command
CMD ["bash"]

0 comments on commit a97c444

Please sign in to comment.