File tree Expand file tree Collapse file tree 7 files changed +32
-15
lines changed Expand file tree Collapse file tree 7 files changed +32
-15
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,8 @@ services:
3131 build :
3232 context : ./stk-engine-py38
3333 args :
34- baseImage : ansys/stk:latest-centos7-pybase
34+ baseImage : ansys/stk:latest-centos7
35+ basePythonImage : ansys/stk:latest-centos7-pybase
3536 environment :
3637 - ANSYSLMD_LICENSE_FILE=$ANSYSLMD_LICENSE_FILE
3738
@@ -43,7 +44,8 @@ services:
4344 build :
4445 context : ./stk-engine-py39
4546 args :
46- baseImage : ansys/stk:latest-centos7-pybase
47+ baseImage : ansys/stk:latest-centos7
48+ basePythonImage : ansys/stk:latest-centos7-pybase
4749 environment :
4850 - ANSYSLMD_LICENSE_FILE=$ANSYSLMD_LICENSE_FILE
4951
@@ -55,6 +57,7 @@ services:
5557 build :
5658 context : ./stk-engine-py310
5759 args :
58- baseImage : ansys/stk:latest-centos7-pybase
60+ baseImage : ansys/stk:latest-centos7
61+ basePythonImage : ansys/stk:latest-centos7-pybase
5962 environment :
6063 - ANSYSLMD_LICENSE_FILE=$ANSYSLMD_LICENSE_FILE
Original file line number Diff line number Diff line change 11# By default, start from the base STK Engine Python image
2- ARG baseImage=ansys/stk:latest-centos7-pybase
3- FROM ${baseImage} as builder
2+ ARG baseImage=ansys/stk:latest-centos7
3+ ARG basePythonImage=ansys/stk:latest-centos7-pybase
4+ FROM ${basePythonImage} as builder
45
56# #############################################
67# 1) Build Python into its own builder stage
@@ -21,10 +22,12 @@ RUN cd /tmp && \
2122# ############################################################
2223
2324# Switch back to non-root user
24- ARG baseImage=ansys/stk:latest-centos7
2525FROM ${baseImage}
26+ USER root
2627
28+ # Copy the Python interpreter, the standard library and pip to the final image
2729COPY --from=builder /usr/local/bin/python3.10 /usr/local/bin/python3.10
30+ COPY --from=builder /usr/local/lib/python3.10 /usr/local/lib/python3.10
2831COPY --from=builder /usr/local/bin/pip3.10 /usr/local/bin/pip3.10
2932
3033RUN ln -sfn /usr/local/bin/python3.10 /usr/bin/python && \
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ services:
66 build :
77 context : .
88 args :
9- baseImage : ansys/stk:latest-centos7-pybase
9+ baseImage : ansys/stk:latest-centos7
10+ basePythonImage : ansys/stk:latest-centos7-pybase
1011 environment :
1112 - ANSYSLMD_LICENSE_FILE=$ANSYSLMD_LICENSE_FILE
Original file line number Diff line number Diff line change 11# By default, start from the base STK Engine Python image
2- ARG baseImage=ansys/stk:latest-centos7-pybase
3- FROM ${baseImage} as builder
2+ ARG baseImage=ansys/stk:latest-centos7
3+ ARG basePythonImage=ansys/stk:latest-centos7-pybase
4+ FROM ${basePythonImage} as builder
45
56# #############################################
67# 1) Build Python into its own builder stage
@@ -21,10 +22,12 @@ RUN cd /tmp && \
2122# ############################################################
2223
2324# Switch back to non-root user
24- ARG baseImage=ansys/stk:latest-centos7
2525FROM ${baseImage}
26+ USER root
2627
28+ # Copy the Python interpreter, the standard library and pip to the final image
2729COPY --from=builder /usr/local/bin/python3.8 /usr/local/bin/python3.8
30+ COPY --from=builder /usr/local/lib/python3.8 /usr/local/lib/python3.8
2831COPY --from=builder /usr/local/bin/pip3.8 /usr/local/bin/pip3.8
2932
3033RUN ln -sfn /usr/local/bin/python3.8 /usr/bin/python && \
Original file line number Diff line number Diff line change @@ -6,6 +6,9 @@ services:
66 build :
77 context : .
88 args :
9- baseImage : ansys/stk:latest-centos7-pybase
9+ baseImage : ansys/stk:latest-centos7
10+ basePythonImage : ansys/stk:latest-centos7-pybase
11+ environment :
12+ - ANSYSLMD_LICENSE_FILE=$ANSYSLMD_LICENSE_FILE
1013 environment :
1114 - ANSYSLMD_LICENSE_FILE=$ANSYSLMD_LICENSE_FILE
Original file line number Diff line number Diff line change 11# By default, start from the base STK Engine Python image
2- ARG baseImage=ansys/stk:latest-centos7-pybase
3- FROM ${baseImage} as builder
2+ ARG baseImage=ansys/stk:latest-centos7
3+ ARG basePythonImage=ansys/stk:latest-centos7-pybase
4+ FROM ${basePythonImage} as builder
45
56# #############################################
67# 1) Build Python into its own builder stage
@@ -21,10 +22,12 @@ RUN cd /tmp && \
2122# ############################################################
2223
2324# Switch back to non-root user
24- ARG baseImage=ansys/stk:latest-centos7
2525FROM ${baseImage}
26+ USER root
2627
28+ # Copy the Python interpreter, the standard library and pip to the final image
2729COPY --from=builder /usr/local/bin/python3.9 /usr/local/bin/python3.9
30+ COPY --from=builder /usr/local/lib/python3.9 /usr/local/lib/python3.9
2831COPY --from=builder /usr/local/bin/pip3.9 /usr/local/bin/pip3.9
2932
3033RUN ln -sfn /usr/local/bin/python3.9 /usr/bin/python && \
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ services:
66 build :
77 context : .
88 args :
9- baseImage : ansys/stk:latest-centos7-pybase
9+ baseImage : ansys/stk:latest-centos7
10+ basePythonImage : ansys/stk:latest-centos7-pybase
1011 environment :
1112 - ANSYSLMD_LICENSE_FILE=$ANSYSLMD_LICENSE_FILE
You can’t perform that action at this time.
0 commit comments