https://pulumi.com logo
Title
f

famous-battery-82719

03/08/2023, 1:06 AM
Hi folks ... I don't see how to represent Container Ports in Python ... anybody have a simple example to share? Thanks much!
b

billowy-army-68599

03/08/2023, 1:07 AM
For which resource?
f

famous-battery-82719

03/08/2023, 1:08 AM
Setting up a container to run an app for my employer ... I have the docker image going, but the app runs on port 8080 (by default) so need to expose that one
b

billowy-army-68599

03/08/2023, 1:19 AM
What do you have so far?
Where is the container running? Which resource are you using?
f

famous-battery-82719

03/08/2023, 1:50 AM
GCP ... I have a docker.RemoteImage resource that works, but I just want to set up a Container object that refers to it and sets up the port correctly.
b

billowy-army-68599

03/08/2023, 2:11 AM
which gcp resource are you currently using?
“container” is a very broad definition, it could be anything - a GKE container, a cloudrun container…
f

famous-battery-82719

03/08/2023, 11:10 PM
It's this code:
I just need to know how to get the container ports set up in Python.
b

billowy-army-68599

03/09/2023, 12:03 AM
https://www.pulumi.com/registry/packages/docker/api-docs/container/#external_nodejs Internal is the container port, external is the external port on the host
f

famous-battery-82719

03/09/2023, 12:19 AM
ok so how do I specify the ports in python code?
Do I just run the dockerfile with the external port set to (whatever) and the internal one to 8080?
I am getting "unable to read Docker image into resource: unable to pull imabe ... error pulling image Error response from daemon pull access denied for image; repository does not exist or may require 'docker login': denied; requested access to the resource is denied. Any ideas on this please?