hey all, I have a simple dockerfile with a base im...
# aws
p
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
what are you trying to run inside the container?
p
Hey! thank you, I am trying to run
Copy code
create_pulumi_program
https://www.pulumi.com/blog/automation-api-python/
b
You need the Pulumi CLI installed as well
p
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
No, you can use the install script
s
@purple-market-1813 If you use
pulumi/python
as your image, you do not need to install Pulumi.
p
@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
I think if the backend is S3, you'd set your container with the right IAM perms.
p
@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