Skip to content

Commit

Permalink
feat: 文件在线预览支持更多的文件类型 #2765
Browse files Browse the repository at this point in the history
1.指定构建preview的dockerfile文件
  • Loading branch information
liuliaozhong committed Dec 25, 2024
1 parent e637c2f commit 1d84f7a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/build-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,16 @@ if [[ $ALL -eq 1 || $BACKEND -eq 1 ]] ; then
for SERVICE in "${BACKENDS[@]}";
do
log "构建${SERVICE}镜像..."
if [[ $SERVICE == "preview" ]]; then
DOCKERFILE="$IMAGE_DIR/backend/preview.Dockerfile"
else
DOCKERFILE="$IMAGE_DIR/backend/backend.Dockerfile"
fi
$BACKEND_DIR/gradlew -p $BACKEND_DIR :$SERVICE:boot-$SERVICE:build -P'devops.assemblyMode'=k8s -x test
rm -rf $tmp_dir/*
cp $IMAGE_DIR/backend/startup.sh $tmp_dir/
cp $BACKEND_DIR/release/boot-$SERVICE.jar $tmp_dir/app.jar
docker build -f $IMAGE_DIR/backend/backend.Dockerfile -t $REGISTRY/$NAMESPACE/bkrepo-$SERVICE:$VERSION $tmp_dir --network=host
docker build -f $DOCKERFILE -t $REGISTRY/$NAMESPACE/bkrepo-$SERVICE:$VERSION $tmp_dir --network=host
if [[ $PUSH -eq 1 ]] ; then
docker push $REGISTRY/$NAMESPACE/bkrepo-$SERVICE:$VERSION
fi
Expand Down

0 comments on commit 1d84f7a

Please sign in to comment.