Giter VIP home page Giter VIP logo

Comments (9)

jpignata avatar jpignata commented on July 17, 2024 2

Yeah, --env is strictly for environment variables. --command is planned for the next release as I mentioned above.

from fargatecli.

jpignata avatar jpignata commented on July 17, 2024

Hmm, you should be able to do something like this:

fargate task run <task name> --image <image uri> --env S3_PATH=s3://bucket/key

Was there an issue with that beyond the need to pass --env?

from fargatecli.

MedLexAI avatar MedLexAI commented on July 17, 2024

Just the S3 path like you describe would work perfectly as long as it gets set within the Fargate task. I will test this and share my results.

from fargatecli.

MedLexAI avatar MedLexAI commented on July 17, 2024

Ok so another issue. Apparently Docker images don't support the standard init runlevel process, so executing the various bits of functionality needed to process the passed S3_PATH environment string is not possible.

I looked a the documentation for fargate task run but didn't see any option to specify a command with the Fargate task launch. Without support for the init process. how do you launch programs within the container using fargate task run? I am trying to avoid ENTRYPOINT or CMD as the image I am using has been modified heavily from a Docker hub pull and not built from a Dockerfile.

from fargatecli.

jpignata avatar jpignata commented on July 17, 2024

I'm going to be adding a --command flag in the next release as per this feature request: #7.

from fargatecli.

MedLexAI avatar MedLexAI commented on July 17, 2024

It looks like ECS supports passing COMMAND or ENTRYPOINT:

https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#container_definition_environment

But it looks like maybe fargate cli has implemented just the --env option as an equivalent docker run --env?

Could CMD or ENTRYPOINT JSON be passed with --env, or is that implemented strictly for environment variables only per docker run --env?

from fargatecli.

MedLexAI avatar MedLexAI commented on July 17, 2024

Cool, thanks for the info. Back to building from a Dockerfile it is then.

from fargatecli.

kwent avatar kwent commented on July 17, 2024

Needs --command so badly as well

from fargatecli.

jpignata avatar jpignata commented on July 17, 2024

Thanks @kwent! I will be adding this in the next release. I have a fair amount of refactoring to complete to get 0.3.0 done, and I will get it out as soon as I can.

from fargatecli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.