Skip to content
This repository was archived by the owner on Aug 16, 2021. It is now read-only.

Commit 8b45562

Browse files
author
Dmitry
committed
Fix order of mount and docker create
1 parent e24c3c8 commit 8b45562

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

nancy_run.sh

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -833,15 +833,7 @@ elif [[ "$RUN_ON" == "aws" ]]; then
833833
msg " To connect docker machine use:"
834834
msg " docker \`docker-machine config $DOCKER_MACHINE\` exec -it pg_nancy_${CURRENT_TS} bash"
835835

836-
containerHash=$( \
837-
docker `docker-machine config $DOCKER_MACHINE` run \
838-
--name="pg_nancy_${CURRENT_TS}" \
839-
-v /home/ubuntu:/machine_home \
840-
-v /home/storage:/storage \
841-
-dit "postgresmen/postgres-with-stuff:pg${PG_VERSION}"
842-
)
843-
dockerConfig=$(docker-machine config $DOCKER_MACHINE)
844-
836+
docker-machine ssh $DOCKER_MACHINE "sudo sh -c \"mkdir /home/storage\""
845837
if [[ "${AWS_EC2_TYPE:0:2}" == "i3" ]]; then
846838
msg "Using high-speed NVMe SSD disks"
847839
# Init i3's NVMe storage, mounting one of the existing volumes to /storage
@@ -874,6 +866,15 @@ elif [[ "$RUN_ON" == "aws" ]]; then
874866
docker-machine ssh $DOCKER_MACHINE sudo mount /dev/xvdf /home/storage
875867
fi
876868
fi
869+
870+
containerHash=$( \
871+
docker `docker-machine config $DOCKER_MACHINE` run \
872+
--name="pg_nancy_${CURRENT_TS}" \
873+
-v /home/ubuntu:/machine_home \
874+
-v /home/storage:/storage \
875+
-dit "postgresmen/postgres-with-stuff:pg${PG_VERSION}"
876+
)
877+
dockerConfig=$(docker-machine config $DOCKER_MACHINE)
877878
else
878879
err "ASSERT: must not reach this point"
879880
exit 1

0 commit comments

Comments
 (0)