Ver código fonte

:bug: add platform support for container

China Kassapa 3 meses atrás
pai
commit
4a82079cd3

+ 1 - 1
docker/mint/build.sh

@@ -13,7 +13,7 @@ export CODE="mint-php$1"
 export TAR="$CODE-$(uname -m)-$VERSION"
 
 docker pull ubuntu:latest
-docker build --platform=linux/$2 --build-arg PHP_VERSION=$1 -t $CODE .
+docker build --platform=linux/$2 --provenance false --build-arg PHP_VERSION=$1 -t $CODE .
 docker save -o $TAR.tar $CODE:latest
 md5sum $TAR.tar >$TAR.md5
 

+ 1 - 1
docker/python/build.sh

@@ -13,7 +13,7 @@ export CODE="mint-python$1"
 export TAR="$CODE-$(uname -m)-$VERSION"
 
 docker pull ubuntu:latest
-docker build --platform=linux/$2 --build-arg PYTHON_VERSION=$1 -t $CODE .
+docker build --platform=linux/$2 --provenance false --build-arg PYTHON_VERSION=$1 -t $CODE .
 # docker save -o $TAR.tar $CODE:latest
 # md5sum $TAR.tar >$TAR.md5
 

+ 4 - 1
scripts/container/mint.sh

@@ -20,8 +20,11 @@ if [[ "$#" -eq 1 && "$1" == "diagnose" ]]; then
     echo "NodeJs: $(node -v)"
     echo "npm: $(npm -v)"
     composer diagnose
+elif [[ "$#" -eq 2 && "$1" == "fcgi" ]]; then
+    echo "start FastCGI server listening on 0.0.0.0:$2"
+    php-fpm -F -R
 else
-    echo "unsupported args, USAGE: $0 diagnose|api-v8 PORT|api-v12 PORT"
+    echo "unsupported args, USAGE: $0 diagnose|fcgi PORT"
     exit 1
 fi
 

+ 18 - 0
scripts/third-dependencies-pack.sh

@@ -0,0 +1,18 @@
+#!/bin/bash
+
+set -e
+
+export VERSION=$(date "+%4Y%m%d%H%M%S")
+
+if [[ "$#" -eq 1 && "$1" == "dashboard" ]]; then
+    XZ_OPT=-9 tar -cJf dashboard-v6-$VERSION.tar.xz -C dashboard-v6/dashboard node_modules package-lock.json
+    XZ_OPT=-9 tar -cJf dashboard-v4-$VERSION.tar.xz -C dashboard-v4/dashboard node_modules yarn.lock
+elif [[ "$#" -eq 1 && "$1" == "laravel" ]]; then
+    XZ_OPT=-9 tar -cJf dashboard-$VERSION.tar.xz -C xxx node_modules package-lock.json
+else
+    echo "USAGE: $0 dashboard|laravel"
+    exit 1
+fi
+
+exit 0
+