mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-09 09:27:03 +03:00
Add docker image test
This commit is contained in:
parent
25d9345a7d
commit
5fac68f2c4
4 changed files with 44 additions and 0 deletions
11
.docker/release/test/test.sh
Executable file
11
.docker/release/test/test.sh
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
# This script tests a given docker image using https://github.com/GoogleContainerTools/container-structure-test
|
||||
set -eu
|
||||
|
||||
IMAGE=${1:-snappymail/snappymail:test}
|
||||
SCRIPT_DIR=$( cd "$(dirname "$0")" && pwd )
|
||||
docker inspect "$IMAGE" > /dev/null 2>&1 || docker pull "$IMAGE" # Pull the image if it doesn't exist in docker daemon
|
||||
docker run --rm -i \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock:ro \
|
||||
-v "$SCRIPT_DIR/config.yaml:/config.yaml:ro" \
|
||||
gcr.io/gcp-runtimes/container-structure-test:latest test --image "$IMAGE" --config config.yaml
|
||||
Loading…
Add table
Add a link
Reference in a new issue