mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
Only use docker inspect with container name #1336
This commit is contained in:
parent
d847be2d5a
commit
167b38df76
8
setup.sh
8
setup.sh
|
@ -36,9 +36,11 @@ DEFAULT_CONFIG_PATH="$(pwd)/config"
|
|||
USE_CONTAINER=false
|
||||
|
||||
_update_config_path() {
|
||||
VOLUME=$($CRI inspect $CONTAINER_NAME \
|
||||
--format="{{range .Mounts}}{{ println .Source .Destination}}{{end}}" | \
|
||||
grep "/tmp/docker-mailserver$" 2>/dev/null)
|
||||
if [ ! -z "$CONTAINER_NAME" ]; then
|
||||
VOLUME=$(docker inspect $CONTAINER_NAME \
|
||||
--format="{{range .Mounts}}{{ println .Source .Destination}}{{end}}" | \
|
||||
grep "/tmp/docker-mailserver$" 2>/dev/null)
|
||||
fi
|
||||
|
||||
if [ ! -z "$VOLUME" ]; then
|
||||
CONFIG_PATH=$(echo $VOLUME | awk '{print $1}')
|
||||
|
|
Loading…
Reference in a new issue