Skip to content

Commit

Permalink
chore: lib added
Browse files Browse the repository at this point in the history
  • Loading branch information
mohiiit committed Dec 9, 2024
1 parent b6d58f5 commit 2c10d3b
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions lib/starkgate-contracts-old/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
FROM python:3.7-slim

# Install system dependencies
RUN apt-get update && apt-get install -y \
make \
libgmp-dev \
g++ \
python3-dev \
npm \
unzip \
curl \
cmake \
&& rm -rf /var/lib/apt/lists/*

# Install Python dependencies
RUN pip install --upgrade pip
RUN pip install cmake==3.22

# Install solc
RUN curl https://binaries.soliditylang.org/linux-amd64/solc-linux-amd64-v0.6.12+commit.27d51765 -o /usr/local/bin/solc-0.6.12
RUN echo 'f6cb519b01dabc61cab4c184a3db11aa591d18151e362fcae850e42cffdfb09a /usr/local/bin/solc-0.6.12' | sha256sum --check
RUN chmod +x /usr/local/bin/solc-0.6.12

# Install ganache
RUN npm install -g --unsafe-perm [email protected]

COPY . /app/

# Build
WORKDIR /app/
RUN rm -rf build
RUN ./build.sh

# Create build directory and demo file
RUN mkdir -p /app/build/Release
RUN touch /app/build/Release/demo.txt
RUN echo 'Hello, World2!' > /app/build/Release/demo.txt

# Create a simpler entrypoint script
RUN echo '#!/bin/sh' > /entrypoint.sh && \
echo 'cp -r /app/build/Release/src/* /mnt/' >> /entrypoint.sh && \
echo 'if [ -z "$1" ]; then' >> /entrypoint.sh && \
echo ' sh' >> /entrypoint.sh && \
echo 'else' >> /entrypoint.sh && \
echo ' sh -c "$*"' >> /entrypoint.sh && \
echo 'fi' >> /entrypoint.sh

# Make entrypoint executable
RUN chmod +x /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
CMD ["sh"]

0 comments on commit 2c10d3b

Please sign in to comment.