forked from mayadata-io/cstor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_image.sh
executable file
·45 lines (36 loc) · 1.22 KB
/
build_image.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
44
45
#!/bin/bash
set -e
pwd
make clean
sh autogen.sh
./configure --enable-uzfs=yes --with-config=user --with-jemalloc
make clean
make
BUILD_DATE=$(date +'%Y%m%d%H%M%S')
REPO_NAME="openebs/cstor-base"
mkdir -p ./docker/zfs/bin
mkdir -p ./docker/zfs/lib
cp cmd/zrepl/.libs/zrepl ./docker/zfs/bin
cp cmd/zpool/.libs/zpool ./docker/zfs/bin
cp cmd/zfs/.libs/zfs ./docker/zfs/bin
cp cmd/zstreamdump/.libs/zstreamdump ./docker/zfs/bin
cp lib/libzrepl/.libs/*.so* ./docker/zfs/lib
cp lib/libzpool/.libs/*.so* ./docker/zfs/lib
cp lib/libuutil/.libs/*.so* ./docker/zfs/lib
cp lib/libnvpair/.libs/*.so* ./docker/zfs/lib
cp lib/libzfs/.libs/*.so* ./docker/zfs/lib
cp lib/libzfs_core/.libs/*.so* ./docker/zfs/lib
sudo docker version
sudo docker build --help
echo "Build image ${REPO_NAME}:ci with BUILD_DATE=${BUILD_DATE}"
cd docker && \
sudo docker build -f Dockerfile.base -t ${REPO_NAME}:ci --build-arg BUILD_DATE=${BUILD_DATE} . && \
IMAGE_REPO=${REPO_NAME} ./push && \
cd ..
REPO_NAME="openebs/cstor-pool"
echo "Build image ${REPO_NAME}:ci with BUILD_DATE=${BUILD_DATE}"
cd docker && \
sudo docker build -f Dockerfile -t ${REPO_NAME}:ci --build-arg BUILD_DATE=${BUILD_DATE} . && \
IMAGE_REPO=${REPO_NAME} ./push && \
cd ..
rm -rf ./docker/zfs