awslabs / fargatecli

CLI for AWS Fargate
Apache License 2.0
893 stars 114 forks source link

Container command override #60

Closed mrname closed 5 years ago

mrname commented 6 years ago

Allow for overriding container command when creating services or running tasks.

mgajda commented 6 years ago

Can you elaborate how it improves over a simple docker script:

FROM my-docker-image
CMD ["myCommand", "with", "custom", "arguments']

We create a new docker image tag, but it should be pushed as almost empty diff, is it not?

mrname commented 5 years ago

Hey @mgajda! Yes that approach definitely works as well. Since the fargate CLI is a wrapper around AWS fargate (which in turn is really a wrapper around ECS), I simply thought it would make sense to provide any useful functionality provided by that platform. Command overrides for tasks is supported in ECS. I personally also find this approach slightly easier as opposed to introducing extra builds and tags into the process (regardless of the speed of the build), as it allows me to build a single image for a variety of tasks when the underlying image should be exactly the same. Lastly, it also solves the following issue:

https://github.com/jpignata/fargate/issues/7

mgajda commented 5 years ago

I agree that this approach may help when you add "development" vs "production" configuration parameter to the image command line. I will check out your patch to provide all-around merge of solid features ;-).