From 821f422b0d345a0e5d9fc8148cc8a12ebce7fe38 Mon Sep 17 00:00:00 2001 From: ImMin5 Date: Wed, 30 Apr 2025 15:18:32 +0900 Subject: [PATCH] feat: update Dockerfile to use Python 3.10 and improve build process Signed-off-by: ImMin5 --- Dockerfile | 16 +++++++++++----- pkg/pip_requirements.txt | 3 +-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 29f85ff..837c57f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,11 @@ -FROM python:3.8-slim +FROM python:3.10-slim -ENV PYTHONUNBUFFERED 1 -ENV SRC_DIR /tmp/src -ENV EXTENSION_DIR /opt/spaceone -ENV PYTHONPATH "${PYTHONPATH}:/opt" +ARG PACKAGE_VERSION + +ENV PYTHONUNBUFFERED=1 +ENV SRC_DIR=/tmp/src +ENV EXTENSION_DIR=/opt/spaceone +ENV PYTHONPATH="${PYTHONPATH}:/opt" RUN apt-get update \ && apt-get install -y wget build-essential @@ -12,3 +14,7 @@ COPY pkg/pip_requirements.txt pip_requirements.txt COPY templates/opt/cloudforet ${EXTENSION_DIR} RUN pip install -r pip_requirements.txt + +COPY ./src ${SRC_DIR} +WORKDIR ${SRC_DIR} +RUN pip install --no-cache-dir . diff --git a/pkg/pip_requirements.txt b/pkg/pip_requirements.txt index e4cc6e3..f1a44d3 100644 --- a/pkg/pip_requirements.txt +++ b/pkg/pip_requirements.txt @@ -31,5 +31,4 @@ opentelemetry-api opentelemetry-sdk opentelemetry-exporter-otlp-proto-grpc opentelemetry-instrumentation-logging -opentelemetry-exporter-prometheus -spaceone-core \ No newline at end of file +opentelemetry-exporter-prometheus \ No newline at end of file