Browse Source

:bug: add arch support

China Kassapa 3 months ago
parent
commit
4f4abca170
3 changed files with 9 additions and 9 deletions
  1. 3 3
      docker/mint/Dockerfile
  2. 3 3
      docker/mint/build.sh
  3. 3 3
      docker/python/build.sh

+ 3 - 3
docker/mint/Dockerfile

@@ -26,9 +26,9 @@ RUN apt -y install git vim locales locales-all tzdata build-essential \
     fonts-tibetan-machine fonts-ddc-uchen fonts-monlam fonts-sambhota-tsugring fonts-sambhota-yigchung \
     imagemagick ffmpeg graphviz pandoc texlive-full \
     python3-full python3-dev \
-    libssl-dev libpq-dev libmysqlclient-dev
-RUN apt -y autoremove
-RUN apt -y clean
+    libssl-dev libpq-dev libmysqlclient-dev \
+    && apt -y autoremove \
+    && apt -y clean
 
 RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
 RUN locale-gen

+ 3 - 3
docker/mint/build.sh

@@ -3,8 +3,8 @@
 set -e
 
 # https://laravel.com/docs/master/releases
-if [ "$#" -ne 1 ]; then
-    echo "USAGE: $0 PHP_VERSION"
+if [ "$#" -ne 2 ]; then
+    echo "USAGE: $0 PHP_VERSION ARCH"
     exit 1
 fi
 
@@ -13,7 +13,7 @@ export CODE="mint-php$1"
 export TAR="$CODE-$(uname -m)-$VERSION"
 
 docker pull ubuntu:latest
-docker build --build-arg PHP_VERSION=$1 -t $CODE .
+docker build --platform=linux/$2 --build-arg PHP_VERSION=$1 -t $CODE .
 docker save -o $TAR.tar $CODE:latest
 md5sum $TAR.tar >$TAR.md5
 

+ 3 - 3
docker/python/build.sh

@@ -3,8 +3,8 @@
 set -e
 
 # https://laravel.com/docs/master/releases
-if [ "$#" -ne 1 ]; then
-    echo "USAGE: $0 PYTHON_VERSION"
+if [ "$#" -ne 2 ]; then
+    echo "USAGE: $0 PYTHON_VERSION ARCH"
     exit 1
 fi
 
@@ -13,7 +13,7 @@ export CODE="mint-python$1"
 export TAR="$CODE-$(uname -m)-$VERSION"
 
 docker pull ubuntu:latest
-docker build --build-arg PYTHON_VERSION=$1 -t $CODE .
+docker build --platform=linux/$2 --build-arg PYTHON_VERSION=$1 -t $CODE .
 # docker save -o $TAR.tar $CODE:latest
 # md5sum $TAR.tar >$TAR.md5