Initial
This commit is contained in:
32
Dockerfile
Normal file
32
Dockerfile
Normal file
@ -0,0 +1,32 @@
|
||||
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" ]
|
||||
Reference in New Issue
Block a user