Просмотр исходного кода

:wrench: use docker as the default container provider

China Kassapa 3 месяцев назад
Родитель
Сommit
e810f35d6f
3 измененных файлов с 24 добавлено и 10 удалено
  1. 5 3
      docker/mint/Dockerfile
  2. 12 4
      docker/mint/README.md
  3. 7 3
      docker/mint/build.sh

+ 5 - 3
docker/mint/Dockerfile

@@ -1,9 +1,9 @@
 FROM ubuntu:latest
 LABEL maintainer="Jeremy Zheng"
 
-ENV DEBIAN_FRONTEND noninteractive
+ENV DEBIAN_FRONTEND="noninteractive"
 # https://launchpad.net/~ondrej/+archive/ubuntu/php
-ARG PHP_VERSION=8.4
+ARG PHP_VERSION=8.5
 
 RUN apt update
 RUN apt -y install lsb-release apt-utils \
@@ -42,7 +42,7 @@ RUN wget -q -O $HOME/downloads/composer https://getcomposer.org/installer
 RUN cd $HOME/downloads && php${PHP_VERSION} composer && cp composer.phar /usr/local/bin/composer
 
 # https://github.com/nvm-sh/nvm
-ENV NVM_VERSION "v0.40.3"
+ENV NVM_VERSION="v0.40.3"
 RUN git clone -b ${NVM_VERSION} https://github.com/nvm-sh/nvm.git $HOME/.nvm
 RUN echo 'export NVM_DIR="$HOME/.nvm"' >> $HOME/.bashrc
 RUN echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $HOME/.bashrc
@@ -52,6 +52,8 @@ RUN bash -i -c "npm install -g yarn"
 
 RUN echo "$(date -u +%4Y%m%d%H%M%S)" | tee /VERSION
 
+EXPOSE 9000/tcp 8080/tcp
+
 VOLUME /srv
 WORKDIR /srv
 

+ 12 - 4
docker/mint/README.md

@@ -2,17 +2,25 @@
 
 ## Usage
 
+- Building
+
 ```bash
 cd ~/workspace/mint/docker
 ./build.sh PHP_VERSION
 ```
 
+- Load image
+
+  ```bash
+  docker load -i mint-php8.4-x86_64.tar
+  ```
+
 - Laravel & PHP compatibility
 
-| Laravel | PHP       | Security Fixes Until |
-| ------- | --------- | -------------------- |
-| 8       | 7.3 - 8.1 | Jan, 2023            |
-| 12      | 8.2 - 8.4 | Feb, 2027            |
+| Laravel                                      | PHP       | Security Fixes Until |
+| -------------------------------------------- | --------- | -------------------- |
+| [8](https://laravel.com/docs/8.x/releases)   | 7.3 - 8.1 | Jan, 2023            |
+| [12](https://laravel.com/docs/12.x/releases) | 8.2 - 8.5 | Feb, 2027            |
 
 ## Documents
 

+ 7 - 3
docker/mint/build.sh

@@ -12,9 +12,13 @@ export VERSION=$(date "+%4Y%m%d%H%M%S")
 export CODE="mint-php$1-$(uname -m)"
 export TAR="$CODE-$VERSION"
 
-podman pull ubuntu:latest
-podman build --build-arg PHP_VERSION=$1 -t $CODE .
-podman save --format=oci-archive -o $TAR.tar $CODE
+# podman pull ubuntu:latest
+# podman build --build-arg PHP_VERSION=$1 -t $CODE .
+# podman save --format=oci-archive -o $TAR.tar $CODE
+
+docker pull ubuntu:latest
+docker build --build-arg PHP_VERSION=$1 -t $CODE .
+docker save -o $TAR.tar $CODE:latest
 md5sum $TAR.tar >$TAR.md5
 
 echo "done($TAR.tar)."