mirror of
https://github.com/schollz/croc.git
synced 2025-10-10 21:01:02 +02:00
Merge pull request #962 from AndrianBdn/main
Add Docker usage instructions for croc tool
This commit is contained in:
commit
6a9fae4211
1 changed files with 10 additions and 0 deletions
10
README.md
10
README.md
|
@ -152,6 +152,16 @@ Or install into a particular environment with [`conda`](https://docs.conda.io/pr
|
|||
conda install --channel conda-forge croc
|
||||
```
|
||||
|
||||
### On Linux, macOS via Docker
|
||||
|
||||
Add the following one-liner function to your ~/.profile (works with any POSIX-compliant shell):
|
||||
|
||||
```bash
|
||||
croc() { [ $# -eq 0 ] && set -- ""; docker run --rm -it --user "$(id -u):$(id -g)" -v "$(pwd):/c" -v "$HOME/.config/croc:/.config/croc" -w /c -e CROC_SECRET schollz/croc "$@"; }
|
||||
```
|
||||
|
||||
You can also just paste it in the terminal for current session. On first run Docker will pull the image. `croc` via Docker will only work within the current directory and its subdirectories.
|
||||
|
||||
### Build from Source
|
||||
|
||||
If you prefer, you can [install Go](https://go.dev/dl/) and build from source (requires Go 1.22+):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue