There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

myliltoehurts ,

It works in docker compose because compose handles relative paths for the volumes, the docker CLI doesn’t.

You can achieve this by doing something like


<span style="color:#323232;">docker run -v $(pwd):/data ...
</span>

pwd is a command that returns the current path as an absolute path, you can just run it by itself to see this. $() syntax is to execute the inner command separately before the shell runs the rest of it. (Same as backticks, just better practice)

I imagine that wouldn’t work on windows, but it would on either osx, Linux or wsl.

Generally speaking, if you need the file system access and your CLI requires some setup, I’d recommend either writing it in a statically compiled language (e.g. golang, rust) or researching how to compile a python script into an executable.

If you’re just mounting your script in the container - you’re better off adding it directly at build time.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines