Adding up correct alias that also handles missing .env file

This commit is contained in:
Torsten Raudssus 2024-12-13 22:29:21 +01:00
parent 02365a6379
commit 6296979bf3

View file

@ -5,7 +5,7 @@
Best used as alias, like in `.bashrc` with: Best used as alias, like in `.bashrc` with:
```bash ```bash
alias crewai="docker run --rm -it --env-file .env -v \$(pwd):/app src.ci/srv/crewai:latest" alias crewai='f(){ if [ -f .env ]; then docker run --rm -it --env-file .env -v $(pwd):/app src.ci/srv/crewai:latest "$@"; else docker run --rm -it -v $(pwd):/app src.ci/srv/crewai:latest "$@"; fi }; f'
``` ```
With this alias you can then directly work with the image, just by using the command `crewai`, assuming you have the User ID 1000, else you might need to make a custom image, see ARGS. With this alias you can then directly work with the image, just by using the command `crewai`, assuming you have the User ID 1000, else you might need to make a custom image, see ARGS.