24 lines
656 B
Docker
24 lines
656 B
Docker
FROM python:3.9-buster
|
|
|
|
RUN sh -c "$(curl -sSfL https://release.solana.com/v1.8.0/install)"
|
|
|
|
RUN apt-get update && apt-get -y install bc curl zlib1g-dev
|
|
|
|
RUN mkdir /app
|
|
COPY ./pyproject.toml ./poetry.lock .
|
|
|
|
WORKDIR /app
|
|
ENV PYTHONPATH=${PYTHONPATH}:/app
|
|
ENV PATH="/app/bin:${PATH}:/app/scripts:${HOME}/.local/share/solana/install/active_release/bin"
|
|
|
|
RUN pip install --upgrade pip && pip --no-cache-dir install poetry
|
|
|
|
RUN poetry config virtualenvs.create false
|
|
RUN poetry install --no-dev --no-root
|
|
|
|
ARG LAST_COMMIT=""
|
|
RUN echo ${LAST_COMMIT} > /app/.version
|
|
|
|
# Have this as the last step since the code here is the most-frequently changing
|
|
COPY . /app
|