mirror of
https://github.com/vacp2p/linea-monorepo.git
synced 2026-01-09 15:38:06 -05:00
* Use multi-stage builds to unzip and copy jars * Change base docker iamge * Fix mkdir command * Revert mkdir concat * Remove apt-get calls * Revert local COPY change * Use apk to install packages * Revert to debian based image * Fix copy location * Merge mkdir commands * Amended directories * Remove libs based on platform * Use uname -m to get current architecture * Switch if statement to case statement to uname call * Fix zip copy * Add WORKDIR to improve readability, move removal of darwin dir out of case switches * feat: change builder image to a more secure one * feat: change builder and final image to eclipse-temurin 21-alpine * feat: removed unnecessary slash * feat: update dockerfile to avoid hardcoded version for jar files * feat: allow more flexible name matching for jar files * feat: use installDist in GHA job to avoid unzip * feat: use installDist in GHA job to avoid unzip in transaction-exclusion-api * feat: update manual image build for coordinator and tx-exclusion-api * feat: revert setting ssl and gssEncMode in tx-exclusion-api integration test --------- Co-authored-by: jonesho <jones.ho@consensys.net> Co-authored-by: jonesho <81145364+jonesho@users.noreply.github.com>
50 lines
1.7 KiB
Docker
50 lines
1.7 KiB
Docker
# BUILDER image
|
|
FROM eclipse-temurin:21-jdk-noble AS builder
|
|
|
|
RUN mkdir -p /libs
|
|
COPY --from=libs ./** /libs
|
|
WORKDIR /libs
|
|
|
|
RUN mkdir -p unpacked-blob-compressor unpacked-blob-shnarf-calculator
|
|
RUN bcJar=$(set -- blob-compressor*.jar; echo $1) && \
|
|
bscJar=$(set -- blob-shnarf-calculator*.jar; echo $1) && \
|
|
cd unpacked-blob-compressor/ && jar -xf ../$bcJar && cd .. && \
|
|
cd unpacked-blob-shnarf-calculator/ && jar -xf ../$bscJar && cd .. && \
|
|
rm -rf unpacked-blob-compressor/darwin-** unpacked-blob-shnarf-calculator/darwin-** && \
|
|
case $(uname -m) in \
|
|
x86_64) \
|
|
rm -rf unpacked-blob-compressor/linux-aarch64/; \
|
|
rm -rf unpacked-blob-shnarf-calculator/linux-aarch64/; \
|
|
;; \
|
|
aarch64) \
|
|
rm -rf unpacked-blob-compressor/linux-x86-64/; \
|
|
rm -rf unpacked-blob-shnarf-calculator/linux-x86-64/; \
|
|
;; \
|
|
esac && \
|
|
jar -cf $bcJar -C unpacked-blob-compressor . && \
|
|
jar -cf $bscJar -C unpacked-blob-shnarf-calculator .
|
|
RUN rm -rf unpacked-blob-compressor unpacked-blob-shnarf-calculator
|
|
|
|
# FINAL image
|
|
FROM eclipse-temurin:21-jre-noble
|
|
|
|
WORKDIR /opt/consensys/linea/coordinator
|
|
|
|
RUN mkdir -p logs /tmp/prover/request /tmp/prover/response
|
|
|
|
COPY --from=builder /libs/** libs/
|
|
|
|
# Build-time metadata as defined at http://label-schema.org
|
|
ARG BUILD_DATE
|
|
ARG VCS_REF
|
|
ARG VERSION
|
|
LABEL org.label-schema.build-date=$BUILD_DATE \
|
|
org.label-schema.name="coordinator" \
|
|
org.label-schema.description="Coordinator for Linea" \
|
|
org.label-schema.url="https://consensys.io/" \
|
|
org.label-schema.vcs-ref=$VCS_REF \
|
|
org.label-schema.vcs-url="https://github.com/ConsenSys/linea-monorepo" \
|
|
org.label-schema.vendor="ConsenSys" \
|
|
org.label-schema.version=$VERSION \
|
|
org.label-schema.schema-version="1.0"
|