mirror of https://github.com/docker/docs.git
Merge pull request #702 from aluzzardi/integration-fix-exec
DO NOT MERGE - Integration fix exec
This commit is contained in:
commit
aa98a1d5c3
|
@ -108,8 +108,7 @@ function teardown() {
|
|||
[[ "${lines[1]}" == *"Up"* ]]
|
||||
|
||||
# grab the checksum of the test file inside the container.
|
||||
# FIXME: if issue #658 solved, use 'exec' instead of 'exec -i'
|
||||
run docker_swarm exec -i test_container md5sum $test_file
|
||||
run docker_swarm exec test_container md5sum $test_file
|
||||
[ "$status" -eq 0 ]
|
||||
[ "${#lines[@]}" -ge 1 ]
|
||||
|
||||
|
@ -199,8 +198,7 @@ function teardown() {
|
|||
[[ "${lines[1]}" == *"Up"* ]]
|
||||
[[ "${lines[1]}" != *"Paused"* ]]
|
||||
|
||||
# FIXME: if issue #658 solved, use 'exec' instead of 'exec -i'
|
||||
run docker_swarm exec -i test_container ls
|
||||
run docker_swarm exec test_container ls
|
||||
[ "$status" -eq 0 ]
|
||||
[ "${#lines[@]}" -ge 2 ]
|
||||
[[ "${lines[0]}" == *"bin"* ]]
|
||||
|
|
|
@ -140,12 +140,18 @@ function start_docker() {
|
|||
for ((i=current; i < (current + instances); i++)); do
|
||||
local port=$(($BASE_PORT + $i))
|
||||
HOSTS[$i]=127.0.0.1:$port
|
||||
DOCKER_CONTAINERS[$i]=$(docker run -d --name node-$i -h node-$i --privileged \
|
||||
-p 127.0.0.1:$port:$port -it \
|
||||
|
||||
# We have to manually call `hostname` since --hostname and --net cannot
|
||||
# be used together.
|
||||
DOCKER_CONTAINERS[$i]=$(
|
||||
docker run -d --name node-$i --privileged -it --net=host \
|
||||
${DOCKER_IMAGE}:${DOCKER_VERSION} \
|
||||
docker -d -H 0.0.0.0:$port \
|
||||
--storage-driver=$STORAGE_DRIVER --exec-driver=$EXEC_DRIVER \
|
||||
"$@")
|
||||
bash -c "\
|
||||
hostname node-$i && \
|
||||
docker -d -H 127.0.0.1:$port \
|
||||
--storage-driver=$STORAGE_DRIVER --exec-driver=$EXEC_DRIVER \
|
||||
`join ' ' $@` \
|
||||
")
|
||||
done
|
||||
|
||||
# Wait for the engines to be reachable.
|
||||
|
|
Loading…
Reference in New Issue