Coder Social home page Coder Social logo

Comments (5)

snshn avatar snshn commented on July 19, 2024 1

Wow, that's some 1337 CLI stuff you have going in there. I'll try to do that thing with the temporary directory, will show what I have in a PR.

from monolith.

thomasmerz avatar thomasmerz commented on July 19, 2024 1

create a temporary directory

From a user's perspective: do whatever is neccessary to keep it as simple as possible when using it. So you would need to fix this line:
$DOCKER run --rm y2z/$PROG_NAME "$@"
to something like that?
$DOCKER run --rm -v "$PWD:/mnt" y2z/$PROG_NAME $url -o /mnt/$outputfile

from monolith.

snshn avatar snshn commented on July 19, 2024

Oh, wow, that's a really neat idea! The only downside I can think of, is that'd be to a detriment to the security aspect that Docker provides... e.g. if the $PWD happens to be ~, it'll just expose everything the user owns to whatever's in the container. Right now it has no ability to "infect" or "hijack" anything, but the -v thing would eliminate that sense of security.

from monolith.

snshn avatar snshn commented on July 19, 2024

I could make it create a temporary directory, e.g. .docker-monolith-temp-39t84tXb, put the -o file there, move it out of there to one level above, and then clean up by removing .docker-monolith-temp-39t84tXb after. That'd preserve the security, yet allow to use the -o option.

from monolith.

thomasmerz avatar thomasmerz commented on July 19, 2024

I'm doing this (-v "$PWD:/mnt") already for running shellcheck on my Macbook in a docker container - so it should be safe enough when someone normally wants the output to be written to a file relative to the current working directory 😄

docker run --rm -v "$PWD:/mnt" koalaman/shellcheck:latest -Calways --exclude=SC1090,SC1091 -S warning $*

from monolith.

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.