Added build script and fixed some bugs

This commit is contained in:
ndouba
2022-11-15 22:32:24 -05:00
parent 8f19249c51
commit 9cc4b28a49
9 changed files with 317 additions and 12 deletions

20
build.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/sh
set -eux
ROOTFS=plugin/rootfs
CONFIG=plugin/config.json
tag=redcanari/device-volume-driver
docker build -t "$tag" -f Dockerfile .
id=$(docker create "$tag" true)
rm -Rf $ROOTFS
mkdir -p $ROOTFS
docker export "$id" | tar -x -C $ROOTFS
docker rm -vf "$id"
docker rmi "$tag"
cp config.json $CONFIG
docker plugin rm -f redcanari/device-volume-driver || echo
docker plugin create redcanari/device-volume-driver ./plugin
docker plugin enable redcanari/device-volume-driver