mirror of
https://github.com/i701/sarlink-portal-api.git
synced 2025-02-22 09:12:25 +00:00
28 lines
567 B
Docker
28 lines
567 B
Docker
|
# pull official base image
|
||
|
FROM python:3.11.4-slim-buster
|
||
|
|
||
|
# set work directory
|
||
|
WORKDIR /app
|
||
|
|
||
|
# set environment variables
|
||
|
ENV PYTHONDONTWRITEBYTECODE 1
|
||
|
ENV PYTHONUNBUFFERED 1
|
||
|
|
||
|
# install system dependencies
|
||
|
RUN apt-get update && apt-get install -y netcat
|
||
|
|
||
|
# install dependencies
|
||
|
RUN pip install --upgrade pip
|
||
|
COPY ./requirements.txt .
|
||
|
RUN pip install -r requirements.txt
|
||
|
|
||
|
# copy entrypoint.sh
|
||
|
COPY ./entrypoint.sh .
|
||
|
RUN sed -i 's/\r$//g' /app/entrypoint.sh
|
||
|
RUN chmod +x /app/entrypoint.sh
|
||
|
|
||
|
# copy project
|
||
|
COPY . .
|
||
|
|
||
|
# run entrypoint.sh
|
||
|
ENTRYPOINT ["/app/entrypoint.sh"]
|