mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-06-11 02:57:43 +02:00
Merge pull request #1344 from erik-wramner/fix_1336_docker_inspect
Only use docker inspect with container name #1336
This commit is contained in:
commit
f69d30f62a
8
setup.sh
8
setup.sh
@ -36,9 +36,11 @@ DEFAULT_CONFIG_PATH="$(pwd)/config"
|
|||||||
USE_CONTAINER=false
|
USE_CONTAINER=false
|
||||||
|
|
||||||
_update_config_path() {
|
_update_config_path() {
|
||||||
VOLUME=$($CRI inspect $CONTAINER_NAME \
|
if [ ! -z "$CONTAINER_NAME" ]; then
|
||||||
--format="{{range .Mounts}}{{ println .Source .Destination}}{{end}}" | \
|
VOLUME=$(docker inspect $CONTAINER_NAME \
|
||||||
grep "/tmp/docker-mailserver$" 2>/dev/null)
|
--format="{{range .Mounts}}{{ println .Source .Destination}}{{end}}" | \
|
||||||
|
grep "/tmp/docker-mailserver$" 2>/dev/null)
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -z "$VOLUME" ]; then
|
if [ ! -z "$VOLUME" ]; then
|
||||||
CONFIG_PATH=$(echo $VOLUME | awk '{print $1}')
|
CONFIG_PATH=$(echo $VOLUME | awk '{print $1}')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user