# This Docker file demonstrates how you can extend the official LinkAhead
# Docker image to include additional dependencies that you might want to use
# for serverside scripting.

# This bases the Docker image on the upsteam image version which is stored in 
# the LINKAHEAD_IMAGE environment variable which is passed on by the Docker 
# compose build arg
ARG LINKAHEAD_IMAGE=this_default/should_not_be_used
FROM $LINKAHEAD_IMAGE

# Option 1 (mode pip):
# Replace <package_name>
RUN pip install --break-system-packages --no-cache-dir <package_name>
# or
COPY <path/to/requirements.txt> ./requirements.txt
RUN pip install --break-system-packages --no-cache-dir -r requirements.txt

# Option 2 (mode copy):
# The source path is relative to the context that is provided in the Docker compose file
# Replace <source> and <example> (twice)
COPY <source> /tmp/pip_package/<example>
RUN pip install --break-system-packages --no-cache-dir /tmp/pip_package/<example>

