fix(docker): changes Dockerfile command order to use pip cache
This commit is contained in:
13
Dockerfile
13
Dockerfile
@@ -2,13 +2,16 @@ FROM python:3-slim
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy requirements first (so pip install can be cached)
|
||||||
|
COPY requirements.txt .
|
||||||
|
|
||||||
|
# Python library requirements
|
||||||
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
# Bricktracker
|
# Bricktracker
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Fix line endings and set executable permissions for entrypoint script
|
# Set executable permissions for entrypoint script
|
||||||
RUN sed -i 's/\r$//' entrypoint.sh && chmod +x entrypoint.sh
|
RUN chmod +x entrypoint.sh
|
||||||
|
|
||||||
# Python library requirements
|
|
||||||
RUN pip --no-cache-dir install -r requirements.txt
|
|
||||||
|
|
||||||
ENTRYPOINT ["./entrypoint.sh"]
|
ENTRYPOINT ["./entrypoint.sh"]
|
||||||
|
|||||||
Reference in New Issue
Block a user