https://pulumi.com logo
#aws
Title
# aws
p

purple-market-1813

12/13/2022, 4:04 PM
hey all, I have a simple dockerfile with a base image of
FROM python:3.9
that runs
RUN pip3 install -r requirements.txt
with a file that looks like this:
Copy code
pulumi>=3.0.0,<4.0.0
pulumi-aws>=4.0.0,<5.0.0
boto3==1.15.16
botocore==1.18.16
but my fargate task is erroring out:
FileNotFoundError: [Errno 2] No such file or directory: 'pulumi'
b

billowy-army-68599

12/13/2022, 4:29 PM
what are you trying to run inside the container?
p

purple-market-1813

12/13/2022, 4:39 PM
Hey! thank you, I am trying to run
Copy code
create_pulumi_program
https://www.pulumi.com/blog/automation-api-python/
b

billowy-army-68599

12/13/2022, 4:40 PM
You need the Pulumi CLI installed as well
p

purple-market-1813

12/13/2022, 4:40 PM
so I should add that to the requirements.txt?
or is the only way to do that by using a pulumi image in the dockerfile?
b

billowy-army-68599

12/13/2022, 5:06 PM
No, you can use the install script
s

stocky-restaurant-98004

12/13/2022, 5:54 PM
@purple-market-1813 If you use
pulumi/python
as your image, you do not need to install Pulumi.
p

purple-market-1813

12/13/2022, 6:54 PM
@stocky-restaurant-98004
FROM pulumi/python
?
would the image need the PULUMI_ACCESS_TOKEN value during the docker build?
what if the backend being used is s3?
(and we don't have a token)
s

stocky-restaurant-98004

12/13/2022, 8:04 PM
I think if the backend is S3, you'd set your container with the right IAM perms.
p

purple-market-1813

12/13/2022, 8:31 PM
@stocky-restaurant-98004 even with permissions my fargate task still gives me this error:
error: PULUMI_ACCESS_TOKEN must be set for login during non-interactive CLI sessions
30 Views