add docker support

This commit is contained in:
MaysWind
2020-10-17 22:20:51 +08:00
parent 90b06cb14b
commit fe361df470
3 changed files with 59 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
mode=$1;
version=`grep "const LAB_VERSION" lab.go | awk -F '=' '{print $2}' | tr -d ' ' | tr -d '"'`;
if [ "$mode" == "--snapshot" ]; then
version="SNAPSHOT-"`date "+%Y%m%d"`;
fi
echo "Building docker image...";
docker build -t lab:${version} .