aboutsummaryrefslogtreecommitdiff
path: root/share/trashman/docker/unix/linux/debian/test
blob: 684453c9ac3efacfb70c42d0361a7b18931ed3b6 (plain)
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
#!/usr/bin/env sh
#
# Test if docker is running correctly.
#

# Parameters
SHARE="$1"

# Include basic functions
. $SHARE/trashman/functions || exit 1

# Basic check
if ! which docker > /dev/null 2>&1; then
  exit 1
fi

# Run hello-world test program
__trashman_echo "Running docker helll-world image..."
docker run hello-world
status="$?"

# Test exit status
if [ "$status" != "0" ]; then
  exit 1
fi

# Success
exit 0