mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
23 lines
377 B
Bash
Executable File
23 lines
377 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
# Use this script to execute commaands in the Docker container.
|
|
# Example: To run the "ls -l" command in the Docker container, enter the command "docker/exec ls -l".
|
|
|
|
function cleanup {
|
|
# capture exit code
|
|
code=$?
|
|
echo "cleaning up"
|
|
|
|
# ignore errors
|
|
set +e
|
|
docker-compose down
|
|
|
|
exit $code
|
|
}
|
|
|
|
trap cleanup EXIT
|
|
|
|
docker-compose run --rm web $@
|