From 86734da8d75f491f27b42bc3766b7903d256f163 Mon Sep 17 00:00:00 2001 From: "joon.ahn" Date: Thu, 23 May 2024 00:59:21 -0700 Subject: [PATCH 1/4] update dockerfile --- Dockerfile | 42 ++++++++++-------------------------------- 1 file changed, 10 insertions(+), 32 deletions(-) diff --git a/Dockerfile b/Dockerfile index cb11e5a..52e32ad 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,40 +1,18 @@ -FROM ubuntu:20.04 +FROM python:3.11.9 -ENV DEBIAN_FRONTEND noninteractive +ENV PYTHONUNBUFFERED=1 \ + PYTHONPATH=/opt/sbosc -# apt update -RUN apt-get update && \ - apt -y upgrade && \ - apt-get install -y software-properties-common && \ - add-apt-repository -y ppa:deadsnakes/ppa && \ - apt-get update +RUN apt-get update && apt-get install -y --no-install-recommends \ + default-libmysqlclient-dev \ + default-mysql-client \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* -# install python -RUN apt-get install -y python3.11 python3.11-dev python3.11-distutils build-essential - -# install mysql, postgres clients -RUN apt-get install -y libmysqlclient-dev mysql-client - -# install utilities -RUN apt-get install -y curl - -# Set working directory WORKDIR /opt/sbosc -# Make python 3.11 the default -# Register the version in alternatives -RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.11 1 - -# Set python 3 as the default python -RUN update-alternatives --set python /usr/bin/python3.11 - -# Install pip and requirements.txt -RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python - -# Install requirements +# Install any needed packages specified in requirements.txt COPY requirements.txt ./ -RUN pip install -r requirements.txt +RUN pip install --no-cache-dir -r requirements.txt -# Copy repository COPY src ./ -ENV PYTHONPATH=/opt/sbosc From b9175032e58d8c70ac17d5b5a5c89c0c2bf434d1 Mon Sep 17 00:00:00 2001 From: Joon Ahn Date: Fri, 24 May 2024 17:19:37 -0700 Subject: [PATCH 2/4] Update Dockerfile Co-authored-by: Jimmy Kim --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 52e32ad..d8a7e7e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11.9 +FROM python:3.11.9-slim ENV PYTHONUNBUFFERED=1 \ PYTHONPATH=/opt/sbosc From 8aca7681588552dd7c6afbfde7ae64dde70dc223 Mon Sep 17 00:00:00 2001 From: Joon Ahn Date: Fri, 24 May 2024 17:19:41 -0700 Subject: [PATCH 3/4] Update Dockerfile Co-authored-by: Jimmy Kim --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index d8a7e7e..a7ca6e8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,7 @@ ENV PYTHONUNBUFFERED=1 \ PYTHONPATH=/opt/sbosc RUN apt-get update && apt-get install -y --no-install-recommends \ + build-essential \ default-libmysqlclient-dev \ default-mysql-client \ && apt-get clean \ From 3138a86c3e65f6493258bb691de7c68abdf4a28f Mon Sep 17 00:00:00 2001 From: Jimmy Kim Date: Mon, 27 May 2024 11:29:21 +0900 Subject: [PATCH 4/4] Remove trailing spaces --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a7ca6e8..0591bff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ ENV PYTHONUNBUFFERED=1 \ PYTHONPATH=/opt/sbosc RUN apt-get update && apt-get install -y --no-install-recommends \ - build-essential \ + build-essential \ default-libmysqlclient-dev \ default-mysql-client \ && apt-get clean \