Skip to content

Commit 9509222

Browse files
authored
Updated Dockerfile 📝
1 parent 64e328e commit 9509222

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

Dockerfile

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
11
# Dockerfile - created by github.com/MarketingPipeline
2-
FROM debian:stable
2+
# Use the official Python 3 image as the base image
3+
FROM python:3
34

4-
## Install linux / python dependencies
5-
RUN apt-get update -y && apt-get install -y python3 python3-pip tesseract-ocr ghostscript
5+
# Install required system dependencies
6+
RUN apt-get update -y && apt-get install -y \
7+
libjpeg-dev \
8+
zlib1g-dev \
9+
&& rm -rf /var/lib/apt/lists/* # Clean up apt cache to reduce image size
610

7-
## Install python project dependencies
8-
RUN pip3 install pillow optimize-images
11+
# Upgrade pip to the latest version
12+
RUN python3 -m pip install --upgrade pip
913

10-
## Copy the Entry Point
14+
# Install Python dependencies for the project (Pillow and optimize-images)
15+
RUN pip3 install --no-cache-dir pillow optimize-images
16+
17+
# Copy the entry point script into the container
1118
COPY entrypoint /usr/local/bin/
1219

13-
## Make entry point exectuable
14-
RUN ["chmod", "+x", "/usr/local/bin/entrypoint"]
15-
## Provide access to entry point
20+
# Make the entry point executable
21+
RUN chmod +x /usr/local/bin/entrypoint
22+
23+
# Define the entry point for the container
1624
ENTRYPOINT ["/usr/local/bin/entrypoint"]

0 commit comments

Comments
 (0)