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