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.
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'
+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.
This is now released in v1.4.0! https://github.com/aws/copilot-cli/releases/tag/v1.4.0
Most helpful comment
This is now released in v1.4.0! https://github.com/aws/copilot-cli/releases/tag/v1.4.0