-
Notifications
You must be signed in to change notification settings - Fork 17
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
5 changed files
with
53 additions
and
31 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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
FROM radixdlt/build-layers:java AS java-container | ||
|
||
WORKDIR /radixdlt | ||
|
||
# Copy the relevant files at the repo root | ||
COPY \ | ||
build.gradle \ | ||
gradlew \ | ||
gradlew.bat \ | ||
settings.gradle \ | ||
sonar-project.properties \ | ||
gradle.properties \ | ||
licence-header.txt \ | ||
/radixdlt/ | ||
COPY ./gradle /radixdlt/gradle | ||
COPY ./common /radixdlt/common | ||
COPY ./core /radixdlt/core | ||
COPY ./core-rust-bridge /radixdlt/core-rust-bridge | ||
COPY ./cli-tools /radixdlt/cli-tools | ||
COPY ./shell /radixdlt/shell | ||
COPY ./keygen /radixdlt/keygen | ||
# Need .git for tag versions - but this can probably be removed soon | ||
COPY ./.git/* /radixdlt/.git/ | ||
|
||
RUN SKIP_NATIVE_RUST_BUILD=TRUE ./gradlew clean build -x test -Pci=true -PrustBinaryBuildType=release | ||
|
||
RUN cd core/build/distributions && \ | ||
unzip -j *.zip && \ | ||
mkdir -p /artifacts && \ | ||
cp *.jar /artifacts && \ | ||
cp core /artifacts | ||
|
||
FROM radixdlt/build-layers:rust AS rust-container | ||
|
||
WORKDIR /app | ||
|
||
COPY core-rust/ /app | ||
|
||
RUN mkdir -p /artifacts && \ | ||
/root/.cargo/bin/cargo build --profile=release && \ | ||
cp target/release/libcorerust.so /artifacts/libcorerust.so | ||
|
||
FROM radixdlt/build-layers:app AS main | ||
|
||
# Copy in the application artifacts | ||
COPY --from=java-container /artifacts/*.jar /opt/radixdlt/lib/ | ||
COPY --from=java-container /artifacts/core /opt/radixdlt/bin/core | ||
COPY --from=rust-container /artifacts/libcorerust.so /usr/lib/jni/libcorerust.so | ||
|
||
RUN chmod +x /opt/radixdlt/bin/core |
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 |
---|---|---|
|
@@ -16,7 +16,7 @@ LABEL org.opencontainers.image.source="https://github.com/radixdlt/babylon-node" | |
LABEL org.opencontainers.image.authors="[email protected]" | ||
LABEL org.opencontainers.image.description="Java + Debian 12 (OpenJDK)" | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
CMD ["/bin/bash"] | ||
|
||
|
@@ -63,26 +63,6 @@ RUN apt-get update \ | |
ENV JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8" | ||
|
||
RUN mkdir -p /radixdlt | ||
# Copy the relevant files at the repo root | ||
# I wish we could just avoid pulling in the rust here, but https://github.com/moby/moby/issues/15771 | ||
COPY \ | ||
build.gradle \ | ||
gradlew \ | ||
gradlew.bat \ | ||
settings.gradle \ | ||
sonar-project.properties \ | ||
gradle.properties \ | ||
licence-header.txt \ | ||
/radixdlt/ | ||
COPY ./gradle /radixdlt/gradle | ||
COPY ./common /radixdlt/common | ||
COPY ./core /radixdlt/core | ||
COPY ./core-rust-bridge /radixdlt/core-rust-bridge | ||
COPY ./cli-tools /radixdlt/cli-tools | ||
COPY ./shell /radixdlt/shell | ||
COPY ./keygen /radixdlt/keygen | ||
# Need .git for tag versions - but this can probably be removed soon | ||
COPY ./.git/* /radixdlt/.git/ | ||
|
||
WORKDIR /radixdlt | ||
|
||
|