-
Notifications
You must be signed in to change notification settings - Fork 104
/
Dockerfile
40 lines (29 loc) · 1.04 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM python:3.12-slim
# Environment settings
ENV PYTHONUNBUFFERED 1
ENV PYTHONDONTWRITEBYTECODE 1
# Set PATH for Poetry
ENV PATH="/root/.local/bin:$PATH"
# Add system-level dependencies (including gcc and npm)
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libpq-dev gcc g++ make libffi-dev build-essential \
curl nodejs npm \
&& rm -rf /var/lib/apt/lists/*
# Install Poetry
RUN curl -sSL https://install.python-poetry.org | python3 -
# Create app directory
RUN mkdir /app
WORKDIR /app
# Copy the pyproject.toml and poetry.lock files into container's /app/ directory
COPY pyproject.toml poetry.lock /app/
# Install dependencies from the poetry.lock file
RUN poetry config virtualenvs.create false \
&& poetry install --no-dev --no-interaction --no-root
# Copy the rest of the application code
ADD . /app
# Install StarknetKit via npm with legacy-peer-deps flag
RUN npm install @argent/get-starknet --legacy-peer-deps --save
# Set the entrypoint script as executable
RUN chmod +x /app/entrypoint.sh
EXPOSE 8000