sst / ion

SST v3
https://sst.dev
MIT License
1.65k stars 212 forks source link

Cluster.addService - option to pull container image instead of build #706

Open elijahmorg opened 2 months ago

elijahmorg commented 2 months ago

Add the ability to bypass building docker images and instead pull an already existing image. It could look something like this.

https://www.pulumi.com/registry/packages/docker/api-docs/remoteimage/

Reason for this is our containers are built in a different pipeline and already pushed into ECR. But being able to pull both from a public registry or private ECR would be good.

    const cluster = new sst.aws.Cluster("MyCluster", { vpc });
    const remoteImage = new docker.RemoteImage("ubuntu", { name: "ubuntu:precise" });

    cluster.addService("MyService", {
      public: {
        ports: [{ listen: "80/http" }],
      },
      transform: {
        image: {
          remoteImage: remoteImage,
        }
      }
    });
fwang commented 1 week ago

@elijahmorg Cluster switched to use the new DockerBuild component now - https://www.pulumi.com/registry/packages/docker-build/api-docs/image/

Does it support what you are trying to do?

/cc @arpadgabor