Przeglądaj źródła

:bug: fix morus image

Jeremy Zheng 2 lat temu
rodzic
commit
e2a6cc13ee
3 zmienionych plików z 16 dodań i 7 usunięć
  1. 2 3
      rpc/morus/Dockerfile
  2. 2 2
      rpc/morus/build.sh
  3. 12 2
      rpc/morus/start.sh

+ 2 - 3
rpc/morus/Dockerfile

@@ -9,8 +9,7 @@ RUN LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php
 RUN apt -y upgrade
 ENV PHP_VERSION="8.2"
 RUN apt install -y sudo wget unzip \
-    php${PHP_VERSION}-zip php${PHP_VERSION}-grpc php${PHP_VERSION}-protobuf \
-    php-grpc-all-dev
+    php${PHP_VERSION}-zip php${PHP_VERSION}-grpc php${PHP_VERSION}-protobuf
 RUN apt clean
 
 # https://getcomposer.org/download/
@@ -29,4 +28,4 @@ RUN echo "$(date -u +%4Y%m%d%H%M%S)" | sudo tee /VERSION
 
 WORKDIR /opt/morus
 
-CMD ["/bin/bash"]
+CMD ["/bin/bash", "-l"]

+ 2 - 2
rpc/morus/build.sh

@@ -7,8 +7,8 @@ export CODE="mint-morus"
 
 buildah pull ubuntu:latest
 buildah bud --layers -t $CODE .
-# podman save --format=oci-archive -o $CODE-$VERSION.tar $CODE
-# md5sum $CODE-$VERSION.tar > md5.txt
+podman save --format=oci-archive -o $CODE-$VERSION.tar $CODE
+md5sum $CODE-$VERSION.tar > md5.txt
 
 echo "done($CODE-$VERSION.tar)."
 

+ 12 - 2
rpc/morus/start.sh

@@ -1,5 +1,15 @@
-#!/bin/sh
+#!/bin/bash
+
+set -e
 
 export CODE="mint-morus"
 
-podman run -it --rm --events-backend=file --hostname=palm --network host $CODE
+if [ "$#" -ne 1 ]
+then
+    echo "USAGE: $0 PORT"
+    exit 1
+fi
+
+podman run -d --rm --events-backend=file --hostname=palm --network host $CODE /usr/bin/php server.php --port $1
+
+exit 0