-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.sh
executable file
·43 lines (28 loc) · 1.29 KB
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
set -euo pipefail
script_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
set -x
cd "${script_dir}/.."
devcontainer build --workspace-folder .
container_id=$(
devcontainer up --workspace-folder . |
tee /dev/stderr |
jq -r .containerId
)
trap 'docker rm -f "${container_id}"' EXIT
devcontainer exec --workspace-folder . docker version
devcontainer exec --workspace-folder . printenv | sort | tee /dev/stderr | grep -q ^USER=
# check if dond shim is setup correctly
devcontainer exec --workspace-folder . bash -c 'DOND_SHIM_PRINT_COMMAND=true docker version' | tee /dev/stderr | grep -q '^docker.orig version$'
docker rm -f "${container_id}"
container_id=$(
devcontainer up --workspace-folder . --config devcontainer/test-fixtures/dind-devcontainer/devcontainer.json |
tee /dev/stderr |
jq -r .containerId
)
devcontainer exec --workspace-folder . --config devcontainer/test-fixtures/dind-devcontainer/devcontainer.json \
docker version
devcontainer exec --workspace-folder . --config devcontainer/test-fixtures/dind-devcontainer/devcontainer.json \
env IGNORE_FAILURE=false /ssh-command/get.sh
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR ssh://devcontainer@localhost:2222 \
docker version