https://pantsbuild.org/ logo
#general
Title
# general
b

blue-football-92560

03/07/2023, 1:31 AM
I'm trying to setup fast incremental docker image builds by using two separate layers for third party and first party packages. I see that I can set
include_requirements=False
in
python_awslambda
to get the first party stuff, but how do I get the corresponding third party stuff?
b

bitter-ability-32190

03/07/2023, 1:33 AM
b

blue-football-92560

03/07/2023, 2:17 AM
Thanks. I think there is some work to make the image compatible with aws lambda, but this may work.
b

bitter-ability-32190

03/07/2023, 2:18 AM
Yup! We tweak it for our own needs as well, but stands up as a great template
b

blue-football-92560

03/07/2023, 5:17 AM
For anyone else that finds this: I am building an amd64 image on mac which resulted in a confusing error from docker on the
COPY --from
step:
Copy code
ERROR: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
fixed by adding some FROM statements:
Copy code
instructions = [
            "FROM --platform=linux/amd64 companyname/app:deps as deps",
            "FROM --platform=linux/amd64 companyname/app:srcs as srcs",
    	    "FROM python:3.10-slim",
    	    'ENTRYPOINT ["/bin/app/pex"]',
    	    "COPY --from=deps /bin/app /bin/app",
    	    "COPY --from=srcs /bin/app /bin/app",
	]
5 Views