Copilot-cli: support ENTRYPOINT override - allow the use of a single image for multiple workload types

Created on 22 Feb 2021  路  3Comments  路  Source: aws/copilot-cli

Scenario

from aws/copilot-cli. @rs-ds says:

Hi Team, I have two services (1 load balanced web service and 1 backend service). Both images are exactly same but each has its own command to run. How can I use the same Dockerfile with different commands for both the service. Or is there any alternative to do this?

In my case, I have a load balanced web service and 1 scheduled job.

The goal here is to avoid building the same image twice. I'm currently working around it by reading environment variable and using a case in bash to launch the desired executable.

Proposal

Allow us to override the ENTRYPOINT in dockerfile with a command field in the copilot manifest to launch a unique process using the same image source.

name: 'fancy-service'
image:
  #  ...
command: ' bundle exec thin -p 3000'
entrypoint: '/app/start.sh'
aremanifest good first issue typfeature

Most helpful comment

All 3 comments

+1 for adding entrypoint, I'm in the same situation, and i think alot of users are facing the same problem. I'm amazed it's not included yet.

@z00dev thanks. Could you use the emote reaction with a thumbs up to show interest? It's best to leave the comments for contributor discussions since everyone involved gets an email.

Was this page helpful?
0 / 5 - 0 ratings