Right now, customers need to have a local Dockerfile/code to deploy their services. We've heard a few times that some customers want to deploy an already published image rather than having to build locally.
In the future perhaps we can support something like
image:
# Location of existing image
name: kohidave/my-published-image
# Port exposed through your container to route traffic to it.
port: 8080
Additional details/case to support this feature, for example, for JVM projects it is common to use jib tool to build the corresponding Docker image for the app, and there is no Dockerfile in place, but rather the complete image, even automatically deployed to ECR.
Also would be nice if there is some flexibility/syntax on how you define the image tag/version to deploy, for example, depends on the branch, i.e. DEVELOP or PROD, or even support of the Git short hash, and so on.
@zshamrock Thank you so much, the additional context is really helpful! For copilot deploy the command supports a --tag flag to be able to provide your own tag for the container image.
How do you guys envision this to work together with Copilot Pipelines?
I mean, supplying your own pre-built image is cool and everything but it would really be next level if it could also kick off a deploy pipeline.
This then have the potential to become the missing glue between your unsupported git repo and Copilot pipelines.
That's a great question :D I don't have an answer yet, but it almost sounds like a separate feature where a Copilot pipeline provides a webhook endpoint that can be used to trigger the pipeline
We could allow you to configure other image repositories as source actions in CodePipeline - that could be awesome. That's super useful even for base images.
Heya everyone! We released v0.5.0: https://github.com/aws/copilot-cli/releases/tag/v0.5.,0 which supports the new image.location field that allows you to use an existing image instead of building from a Dockerfile.
image:
location: nginx
Is there any support in copilot for images when they're in a private container registry such as Gitlab or Dockerhub (where it requires docker login)?
Hi @diegosasw ! Apologies we don't have a credential field supported yet in the image section. Would you mind giving a :+1: to this issue https://github.com/aws/copilot-cli/issues/2101 for us to prioritize it? One workaround like David writes is to publish the image to ECR but I understand that it's not ideal
Most helpful comment
Additional details/case to support this feature, for example, for JVM projects it is common to use jib tool to build the corresponding Docker image for the app, and there is no
Dockerfilein place, but rather the complete image, even automatically deployed to ECR.