-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Use an official Python runtime as a parent image | ||
FROM python:3.10-slim | ||
|
||
# Environment variables | ||
ARG YOUR_ENV | ||
|
||
ENV YOUR_ENV=${YOUR_ENV:-development} \ | ||
PYTHONFAULTHANDLER=1 \ | ||
PYTHONUNBUFFERED=1 \ | ||
PYTHONHASHSEED=random \ | ||
PIP_NO_CACHE_DIR=off \ | ||
PIP_DISABLE_PIP_VERSION_CHECK=on \ | ||
PIP_DEFAULT_TIMEOUT=100 \ | ||
POETRY_VIRTUALENVS_CREATE=false \ | ||
POETRY_NO_INTERACTION=1 | ||
|
||
# Install necessary build tools and dependencies | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
gcc \ | ||
make \ | ||
build-essential \ | ||
libffi-dev \ | ||
libssl-dev \ | ||
python3-dev \ | ||
curl \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Install Poetry in a known location and add to PATH | ||
RUN curl -sSL https://install.python-poetry.org | python3 - \ | ||
&& ln -s /root/.local/bin/poetry /usr/local/bin/poetry | ||
|
||
# Set the working directory in the container | ||
WORKDIR /app | ||
|
||
# Copy only pyproject.toml and poetry.lock to cache them in the Docker layer | ||
COPY pyproject.toml poetry.lock /app/ | ||
|
||
# Install the dependencies from pyproject.toml using Poetry | ||
RUN poetry install $(test "$YOUR_ENV" = production && echo "--only=main") --no-interaction --no-ansi | ||
|
||
# Install the darwin-py package and CLI executable using pip | ||
RUN pip install darwin-py | ||
|
||
# The following steps are commented out to allow users to customize the Dockerfile: | ||
|
||
# Copy the rest of the application code (uncomment and modify as needed) | ||
# COPY . /app | ||
|
||
# Expose any necessary ports (uncomment and modify as needed) | ||
# EXPOSE 80 | ||
|
||
# Set an entry point or command (uncomment and modify as needed) | ||
# CMD ["python", "/app/your_main_script.py"] | ||
|
||
# End of Dockerfile |
This file was deleted.
Oops, something went wrong.