2021-10-11 09:08:54 -07:00
|
|
|
FROM python:3.9-buster
|
2021-04-22 06:28:32 -07:00
|
|
|
|
2021-10-26 10:45:04 -07:00
|
|
|
RUN sh -c "$(curl -sSfL https://release.solana.com/v1.8.1/install)"
|
2021-05-04 09:18:09 -07:00
|
|
|
|
2021-10-11 09:08:54 -07:00
|
|
|
RUN apt-get update && apt-get -y install bc curl zlib1g-dev
|
2021-04-14 08:51:39 -07:00
|
|
|
|
2021-10-11 09:08:54 -07:00
|
|
|
RUN mkdir /app
|
2021-10-14 04:33:32 -07:00
|
|
|
COPY ./pyproject.toml ./poetry.lock ./
|
2021-04-22 06:28:32 -07:00
|
|
|
|
2021-10-11 09:08:54 -07:00
|
|
|
WORKDIR /app
|
|
|
|
ENV PYTHONPATH=${PYTHONPATH}:/app
|
2021-10-18 03:23:01 -07:00
|
|
|
ENV PATH="/app/bin:${PATH}:/app/scripts:/root/.local/share/solana/install/active_release/bin"
|
2021-04-22 06:28:32 -07:00
|
|
|
|
2021-10-11 09:08:54 -07:00
|
|
|
RUN pip install --upgrade pip && pip --no-cache-dir install poetry
|
2021-04-14 08:51:39 -07:00
|
|
|
|
2021-10-11 09:08:54 -07:00
|
|
|
RUN poetry config virtualenvs.create false
|
|
|
|
RUN poetry install --no-dev --no-root
|
2021-06-16 10:22:42 -07:00
|
|
|
|
2021-10-11 09:08:54 -07:00
|
|
|
ARG LAST_COMMIT=""
|
2021-11-16 10:01:44 -08:00
|
|
|
RUN echo ${LAST_COMMIT} > /app/data/.version
|
2021-04-14 08:51:39 -07:00
|
|
|
|
2021-10-11 09:08:54 -07:00
|
|
|
# Have this as the last step since the code here is the most-frequently changing
|
2021-10-14 04:33:32 -07:00
|
|
|
COPY . /app/
|