-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(docs): updated readme and fixed launcher #298
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
93d04d3
updated launcher
antiyro fbc246c
fixed more stuff
antiyro b84ee44
added port security
antiyro 9fa90bc
small fix until docker image
antiyro 949c86e
merged main
antiyro 1068958
Merge branch 'main' of https://github.com/madara-alliance/madara into…
antiyro e66177b
Merge branch 'main' of https://github.com/madara-alliance/madara into…
antiyro 9083b7c
fixed dockerfile
antiyro 3f86de7
added release and docker build workflows
antiyro 7381ac9
added release and docker build workflows
antiyro 80e6623
changelog
antiyro a01f2dc
updated release workflow
antiyro dbb2e89
updated release workflow
antiyro 7866af5
updated release workflow
antiyro 22f4fc8
updated launcher and docker build release
antiyro afde752
updated launcher
antiyro 4c6e13e
added chain config configuration
antiyro 1b8b45f
optimized docker build and launcher
antiyro 7089a96
resolved conflicts
antiyro f728bf9
cleaned inputs
antiyro 3820581
updated readme
antiyro 8e39384
updated readme
antiyro 818c987
rebased with main
antiyro 2bfc8e6
reverted working docker
antiyro 32aac9f
Update Dockerfile
antiyro 4677439
updated docker build according to new dockerfile
antiyro f19d4f5
Merge branch 'fix/high' of https://github.com/madara-alliance/madara …
antiyro d391bad
removed unused dependency tini
antiyro 1a00ff1
updated some documentation
antiyro d6832bd
removed docker warnings
antiyro 7d9e608
prettified markdown
antiyro fa645d4
runned prettier on md
antiyro File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -1,60 +1,48 @@ | ||
# Stage 1: Build the application | ||
FROM rust:1.78 AS builder | ||
|
||
# Install build dependencies | ||
RUN apt-get -y update && \ | ||
RUN apt-get -y update && \ | ||
apt-get install -y clang && \ | ||
apt-get autoremove -y; \ | ||
apt-get clean; \ | ||
apt-get autoremove -y; \ | ||
apt-get clean; \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Set the working directory | ||
WORKDIR /usr/src/madara/ | ||
|
||
# Copy the source code | ||
# Copy the source code into the container | ||
COPY Cargo.toml Cargo.lock ./ | ||
COPY crates crates | ||
COPY cairo cairo | ||
COPY cairo_0 cairo_0 | ||
|
||
# Installing Scarb | ||
# Dynamically detect the architecture | ||
ARG SCARB_VERSION="v2.8.2" | ||
ARG SCARB_REPO="https://github.com/software-mansion/scarb/releases/download" | ||
RUN ARCH=$(uname -m); \ | ||
if [ "$ARCH" = "x86_64" ]; then \ | ||
PLATFORM="x86_64-unknown-linux-gnu"; \ | ||
elif [ "$ARCH" = "aarch64" ] || [ "$ARCH" = "arm64" ]; then \ | ||
PLATFORM="aarch64-unknown-linux-gnu"; \ | ||
else \ | ||
echo "Unsupported architecture: $ARCH"; exit 1; \ | ||
fi && \ | ||
curl -fLS -o /usr/src/scarb.tar.gz \ | ||
$SCARB_REPO/$SCARB_VERSION/scarb-$SCARB_VERSION-$PLATFORM.tar.gz && \ | ||
tar -xz -C /usr/local --strip-components=1 -f /usr/src/scarb.tar.gz | ||
|
||
# Installing scarb, new since devnet integration | ||
ENV SCARB_VERSION="v2.8.2" | ||
ENV SHELL="/bin/bash" | ||
RUN curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh -s -- ${SCARB_VERSION} | ||
ENV PATH="/root/.local/bin:${PATH}" | ||
RUN scarb --version | ||
|
||
# Install runtime dependencies | ||
RUN apt-get -y update && \ | ||
apt-get install -y openssl ca-certificates busybox && \ | ||
apt-get autoremove -y; \ | ||
apt-get clean; \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Build the application in release mode | ||
RUN cargo build --release | ||
|
||
# Stage 2: Create the final runtime image | ||
FROM debian:bookworm-slim | ||
|
||
FROM debian:bookworm | ||
# Install runtime dependencies | ||
RUN apt-get -y update && \ | ||
apt-get install -y openssl ca-certificates && \ | ||
apt-get autoremove -y; \ | ||
apt-get clean; \ | ||
RUN apt-get -y update && \ | ||
apt-get install -y openssl ca-certificates &&\ | ||
apt-get autoremove -y; \ | ||
apt-get clean; \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Set the working directory | ||
WORKDIR /usr/local/bin | ||
|
||
# Copy the compiled binary from the builder stage | ||
COPY --from=builder /usr/src/madara/target/release/madara . | ||
|
||
# Chain presets to be mounted at startup | ||
VOLUME crates/primitives/chain_config/presets | ||
VOLUME crates/primitives/chain_config/resources | ||
|
||
# Set the entrypoint | ||
ENTRYPOINT ["./madara"] |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't need to mount this anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nop this is unused and was added as a fix for unaccessible chain configs but now we fetch them (iirc)