Skip to content

Commit 6e69868

Browse files
fix(docs): updated readme and fixed launcher (#298)
Co-authored-by: Apoorv Sadana <[email protected]>
1 parent 9724575 commit 6e69868

File tree

5 files changed

+307
-163
lines changed

5 files changed

+307
-163
lines changed

.github/workflows/docker-build.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,6 @@ jobs:
1212
- name: Checkout repository
1313
uses: actions/checkout@v3
1414

15-
- name: Set up QEMU
16-
uses: docker/setup-qemu-action@v2
17-
18-
- name: Set up Docker Buildx
19-
uses: docker/setup-buildx-action@v2
20-
2115
- name: Log in to GitHub Container Registry
2216
uses: docker/login-action@v2
2317
with:
@@ -31,7 +25,6 @@ jobs:
3125
context: .
3226
file: ./Dockerfile
3327
push: true
34-
platforms: linux/amd64,linux/arm64
3528
tags: |
3629
ghcr.io/${{ github.repository_owner }}/madara:latest
3730
ghcr.io/${{ github.repository_owner }}/madara:${{ github.event.release.tag_name }}

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Next release
44

5+
- fix(docs): updated readme and fixed launcher
56
- fix(ci): added gateway key to fix rate limit on tests
67
- feat(cli): launcher script and release workflows
78
- fix: cleaned cli settings for sequencer, devnet and full

Dockerfile

Lines changed: 23 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,48 @@
11
# Stage 1: Build the application
22
FROM rust:1.78 AS builder
3-
43
# Install build dependencies
5-
RUN apt-get -y update && \
4+
RUN apt-get -y update && \
65
apt-get install -y clang && \
7-
apt-get autoremove -y; \
8-
apt-get clean; \
6+
apt-get autoremove -y; \
7+
apt-get clean; \
98
rm -rf /var/lib/apt/lists/*
10-
119
# Set the working directory
1210
WORKDIR /usr/src/madara/
13-
14-
# Copy the source code
11+
# Copy the source code into the container
1512
COPY Cargo.toml Cargo.lock ./
1613
COPY crates crates
1714
COPY cairo cairo
1815
COPY cairo_0 cairo_0
1916

20-
# Installing Scarb
21-
# Dynamically detect the architecture
22-
ARG SCARB_VERSION="v2.8.2"
23-
ARG SCARB_REPO="https://github.com/software-mansion/scarb/releases/download"
24-
RUN ARCH=$(uname -m); \
25-
if [ "$ARCH" = "x86_64" ]; then \
26-
PLATFORM="x86_64-unknown-linux-gnu"; \
27-
elif [ "$ARCH" = "aarch64" ] || [ "$ARCH" = "arm64" ]; then \
28-
PLATFORM="aarch64-unknown-linux-gnu"; \
29-
else \
30-
echo "Unsupported architecture: $ARCH"; exit 1; \
31-
fi && \
32-
curl -fLS -o /usr/src/scarb.tar.gz \
33-
$SCARB_REPO/$SCARB_VERSION/scarb-$SCARB_VERSION-$PLATFORM.tar.gz && \
34-
tar -xz -C /usr/local --strip-components=1 -f /usr/src/scarb.tar.gz
17+
18+
# Installing scarb, new since devnet integration
19+
ENV SCARB_VERSION="v2.8.2"
20+
ENV SHELL="/bin/bash"
21+
RUN curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh -s -- ${SCARB_VERSION}
22+
ENV PATH="/root/.local/bin:${PATH}"
23+
RUN scarb --version
24+
25+
# Install runtime dependencies
26+
RUN apt-get -y update && \
27+
apt-get install -y openssl ca-certificates busybox && \
28+
apt-get autoremove -y; \
29+
apt-get clean; \
30+
rm -rf /var/lib/apt/lists/*
3531

3632
# Build the application in release mode
3733
RUN cargo build --release
38-
3934
# Stage 2: Create the final runtime image
40-
FROM debian:bookworm-slim
41-
35+
FROM debian:bookworm
4236
# Install runtime dependencies
43-
RUN apt-get -y update && \
44-
apt-get install -y openssl ca-certificates && \
45-
apt-get autoremove -y; \
46-
apt-get clean; \
37+
RUN apt-get -y update && \
38+
apt-get install -y openssl ca-certificates &&\
39+
apt-get autoremove -y; \
40+
apt-get clean; \
4741
rm -rf /var/lib/apt/lists/*
48-
4942
# Set the working directory
5043
WORKDIR /usr/local/bin
51-
5244
# Copy the compiled binary from the builder stage
5345
COPY --from=builder /usr/src/madara/target/release/madara .
5446

55-
# Chain presets to be mounted at startup
56-
VOLUME crates/primitives/chain_config/presets
57-
VOLUME crates/primitives/chain_config/resources
58-
5947
# Set the entrypoint
6048
ENTRYPOINT ["./madara"]

0 commit comments

Comments
 (0)