Skip to content

Commit 42e332c

Browse files
authored
Merge pull request #173 from ImMin5/master
Update Dockerfile to use Python 3.10 and improve build process
2 parents f8a0845 + 821f422 commit 42e332c

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

Dockerfile

+11-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
FROM python:3.8-slim
1+
FROM python:3.10-slim
22

3-
ENV PYTHONUNBUFFERED 1
4-
ENV SRC_DIR /tmp/src
5-
ENV EXTENSION_DIR /opt/spaceone
6-
ENV PYTHONPATH "${PYTHONPATH}:/opt"
3+
ARG PACKAGE_VERSION
4+
5+
ENV PYTHONUNBUFFERED=1
6+
ENV SRC_DIR=/tmp/src
7+
ENV EXTENSION_DIR=/opt/spaceone
8+
ENV PYTHONPATH="${PYTHONPATH}:/opt"
79

810
RUN apt-get update \
911
&& apt-get install -y wget build-essential
@@ -12,3 +14,7 @@ COPY pkg/pip_requirements.txt pip_requirements.txt
1214
COPY templates/opt/cloudforet ${EXTENSION_DIR}
1315

1416
RUN pip install -r pip_requirements.txt
17+
18+
COPY ./src ${SRC_DIR}
19+
WORKDIR ${SRC_DIR}
20+
RUN pip install --no-cache-dir .

pkg/pip_requirements.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,4 @@ opentelemetry-api
3131
opentelemetry-sdk
3232
opentelemetry-exporter-otlp-proto-grpc
3333
opentelemetry-instrumentation-logging
34-
opentelemetry-exporter-prometheus
35-
spaceone-core
34+
opentelemetry-exporter-prometheus

0 commit comments

Comments
 (0)