I'm trying to setup fast incremental docker image ...
# general
b
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
b
Thanks. I think there is some work to make the image compatible with aws lambda, but this may work.
b
Yup! We tweak it for our own needs as well, but stands up as a great template
b
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",
	]