btrfs-progs/ci/images/docker-build
David Sterba e61eb57b6b btrfs-progs: ci: add docker build and test scripts
Add scripts that can be used to build docker images and executed from
inside docker containers to verify build or run the testsuite.
Some tweaks are needed at each step to make things work.

- docker-build - build the image
- docker-run - run the default command (test-build)
- run-tests - run the testsuite

Signed-off-by: David Sterba <dsterba@suse.com>
2021-03-01 15:46:34 +01:00

12 lines
335 B
Bash
Executable File

#!/bin/sh
# Run from the directory with Dockerfile, directory name should match the image
# name
prefix=kdave
image=$(basename `pwd` | tr '[A-Z]' '[a-z]')
# Make sure the file exists as it's required but can be empty. In that case
# it's downloaded when ./test-build is executed
touch devel.tar.gz
docker build -t "$prefix/$image" .