Our images set CMD ["pulumi"], except the kitchen sink, which sets ENTRYPOINT ["pulumi"].
CMD sets the arguments that are passed to the ENTRYPOINT. The default entrypoint is usually bash -c.
The README says (outdated, obviously):
In order to try and keep the images flexible and try to meet as many use cases as possible, none of these images have CMD or entrypoint set, so you'll need to specify the commands you want to run, for example:
docker run -e PULUMI_ACCESS_TOKEN=<TOKEN> -v "$(pwd)":/pulumi/projects $IMG /bin/bash -c "npm ci && pulumi preview -s <stackname>"
The base image for Python sets CMD ["python"], overriding that to CMD ["pulumi"] makes some sense, if you docker run with no other arguments, it prints the pulumi CLI help, rather than starting a python interpreter.
Setting the entrypoint to pulumi means when you run docker run $IMG version and it will essentially run pulumi version. At first glance, that seems useful, for example you just pass up to run an update, but in practice you might need to run pulumi install first. Now you're forced to override the entrypoint: docker run --entrypoint bash pulumi/pulumi -c "pulumi install && pulumi up --yes" (note that awkward arguments -c "...").
Our images set
CMD ["pulumi"], except the kitchen sink, which setsENTRYPOINT ["pulumi"].CMDsets the arguments that are passed to theENTRYPOINT. The default entrypoint is usuallybash -c.The README says (outdated, obviously):
The base image for Python sets
CMD ["python"], overriding that toCMD ["pulumi"]makes some sense, if youdocker runwith no other arguments, it prints the pulumi CLI help, rather than starting a python interpreter.Setting the entrypoint to
pulumimeans when you rundocker run $IMG versionand it will essentially runpulumi version. At first glance, that seems useful, for example you just passupto run an update, but in practice you might need to runpulumi installfirst. Now you're forced to override the entrypoint:docker run --entrypoint bash pulumi/pulumi -c "pulumi install && pulumi up --yes"(note that awkward arguments-c "...").