Files
fairhopper/Dockerfile
Eden Kirin 53dbc47553 Initial
2023-04-21 10:23:17 +02:00

33 lines
722 B
Docker

FROM python:3.10.11-alpine3.17
ARG INTERNAL_API_PORT
ARG INTERNAL_WS_PORT
RUN \
pip install pip -U && \
pip install poetry --no-cache-dir
WORKDIR /app
COPY pyproject.toml .
COPY poetry.lock .
# create virtual environment
RUN python -m venv /venv
# set python thingies and activate virtual environment
ENV \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PATH="/venv/bin:$PATH"
RUN \
# dump python dependencies into requirements file
poetry export --without-hashes --format=requirements.txt > requirements.txt && \
# install python libs
pip install -r requirements.txt --no-cache-dir --prefer-binary
COPY ./.docker/run.sh .
COPY ./hopper ./service
ENTRYPOINT [ "/app/run.sh" ]