From d1abb50cdc412146c95b876438e3dbb6ea91fab2 Mon Sep 17 00:00:00 2001 From: rf-opssupport <84499879+rf-opssupport@users.noreply.github.com> Date: Wed, 18 Dec 2024 20:23:30 +0530 Subject: [PATCH] Updated Dockerfile --- Dockerfile | 41 +++++++++++++++++------------------------ 1 file changed, 17 insertions(+), 24 deletions(-) diff --git a/Dockerfile b/Dockerfile index d0dd708..e829247 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,33 +1,26 @@ -FROM python:3.10 -ADD . /app +# Use Alpine base image for building +FROM alpine:3.18 AS builder + +# Set the working directory +WORKDIR /app -# Install dependencies including pandoc and AWS CLI -RUN apt-get update && \ - apt-get install -y --no-install-recommends \ +# Install necessary system dependencies +RUN apk update && apk add --no-cache \ + bash \ pandoc \ - libexpat1 \ - texlive-xetex \ - texlive-fonts-recommended \ - texlive-plain-generic \ - texlive-latex-extra \ - python3 \ - python3-pip \ - && pip3 install --upgrade pip \ - && pip3 install awscli \ - && apt-get clean && \ - rm -rf /var/lib/apt/lists/* + libmagic \ + fontconfig \ + build-base \ + openssl \ + && apk upgrade openssl \ + && rm -rf /var/cache/apk/* -WORKDIR /app -RUN python -m venv venv -RUN . venv/bin/activate -RUN pip install --upgrade pip -RUN pip install setuptools wheel -RUN pip install --no-cache-dir -r requirements.txt +# Add application code to /app +ADD . /app -# Make sure entrypoint.sh is executable RUN chmod +x /app/entrypoint.sh +# Expose the application port EXPOSE 3000 -# Set the entrypoint ENTRYPOINT ["/bin/bash", "-c", "/app/entrypoint.sh"]