wide-midnight-78598
05/04/2022, 9:07 PMFROM nginx/unit:1.26.1-python3.9
COPY backend/apigateway/config.json /docker-entrypoint.d/config.json
COPY backend/apigateway/apigateway.pex /apigateway.pex
RUN PEX_TOOLS=1 /apigateway.pex venv /app
WORKDIR /app
16:58:54.10 [ERROR] 1 Exception encountered:
ProcessExecutionFailure: Process 'Building docker image apigateway-container:latest' failed with exit code 1.
stdout:
stderr:
#1 [internal] load build definition from Dockerfile
#1 sha256:dd05a256bf0a700475eee66e2bab7b409dfa252f9d5b9c512a20570645e0a542
#1 transferring dockerfile: 259B done
#1 DONE 0.0s
#2 [internal] load .dockerignore
#2 sha256:61b1ab8a8d14acfdedce93b66af15c72891c34a5899e37ffb9c6f9628f63a840
#2 transferring context: 2B done
#2 DONE 0.0s
#3 [internal] load metadata for <http://docker.io/nginx/unit:1.26.1-python3.9|docker.io/nginx/unit:1.26.1-python3.9>
#3 sha256:29341916069df22232847ba48ae4db61f24890c7b9ecbd26801c5739bc6e7b2b
#3 DONE 0.2s
#4 [1/5] FROM <http://docker.io/nginx/unit:1.26.1-python3.9@sha256:fd65503ce126888587050d2ab77d9324bed7fd5cb84a7da29b926303a3b3beba|docker.io/nginx/unit:1.26.1-python3.9@sha256:fd65503ce126888587050d2ab77d9324bed7fd5cb84a7da29b926303a3b3beba>
#4 sha256:cc3caab62ea82004335d0ff18f5f40e1ae0b0ee6932679be1c7144e8ad4072f7
#4 DONE 0.0s
#5 [internal] load build context
#5 sha256:f07b09714c1c81e44b9534d3b0fdf55d4bbbd51b1d5d730df0f29b1d51ed34a4
#5 transferring context: 17.83MB 4.6s
#5 transferring context: 20.00MB 5.4s done
#5 DONE 5.4s
#6 [2/5] COPY backend/apigateway/config.json /docker-entrypoint.d/config.json
#6 sha256:8663783c824d8e671e1c968f89cc4d12ba24ea91acd6a8508e756eabd479b8bf
#6 CACHED
#7 [3/5] COPY backend/apigateway/apigateway.pex /apigateway.pex
#7 sha256:ba50617df623b8c168123d021d61454e8f26c99e35650d16eb3d614370e5bd53
#7 CACHED
#8 [4/5] RUN PEX_TOOLS=1 /apigateway.pex venv /app
#8 sha256:caaa14b420888270c8c3bff91403db9f760633ee2c61e9340a947bc1761729cb
#8 0.639 /usr/bin/env: 'python3.10': No such file or directory
#8 ERROR: executor failed running [/bin/sh -c PEX_TOOLS=1 /apigateway.pex venv /app]: exit code: 127
------
> [4/5] RUN PEX_TOOLS=1 /apigateway.pex venv /app:
------
executor failed running [/bin/sh -c PEX_TOOLS=1 /apigateway.pex venv /app]: exit code: 127
enough-analyst-54434
05/04/2022, 9:16 PMhead -1 your.pex
on your machine. You'll find an enlightening shebang. You need to be either setting a custom, more flexible shebang (both Pants and Pex have options for this) or explicitly building the PEX file using python 3.9 - there are several ways to do this via Pants or via Pex. I can flesh out details if you get stuck.enough-analyst-54434
05/04/2022, 9:25 PM/this/python my.pex
.wide-midnight-78598
05/04/2022, 11:53 PMwide-midnight-78598
05/04/2022, 11:55 PMwide-midnight-78598
05/05/2022, 1:51 AM