Skip to content

Commit

Permalink
FROM php:8.2.11-cli-alpine
Browse files Browse the repository at this point in the history
  • Loading branch information
Tinywan committed Oct 11, 2023
1 parent f43b24d commit 6387096
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 6 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#FROM php:7.4.33-cli-alpine
FROM php:8.1.24-cli
#FROM php:8.2.11-cli-alpine
# FROM php:8.1.24-cli
FROM php:8.2.11-cli-alpine

LABEL Maintainer="ShaoBo Wan (Tinywan) <756684177@qq.com>" \
Description="Webman Lightweight container with PHP 8.2.11 based on Alpine Linux."
Expand All @@ -18,8 +18,8 @@ RUN apk update && apk add bash curl ca-certificates openssl openssh git nano lib
COPY ./extension /tmp/extension
WORKDIR /tmp/extension
RUN chmod +x install.sh \
&& sh install.sh
# && rm -rf /tmp/extension
&& sh install.sh \
&& rm -rf /tmp/extension

RUN php -m

Expand Down Expand Up @@ -49,7 +49,7 @@ USER root
WORKDIR /app

# Expose the port nginx is reachable on
EXPOSE 8080
EXPOSE 8787

# Let supervisord start nginx & php
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,48 @@ docker rmi -f $(docker images -qa)



## dos2unix install.sh

```
=> ERROR [ 7/14] RUN chmod +x install.sh && sh install.sh && rm -rf /tmp/extension 0.2s
------
> [ 7/14] RUN chmod +x install.sh && sh install.sh && rm -rf /tmp/extension:
: not foundll.sh: line 1: #!/bin/sh
: not foundll.sh: line 2:
: not foundll.sh: line 4:
: not foundll.sh: line 10: echo
: not foundll.sh: line 11:
: not foundll.sh: line 13:
: not foundll.sh: line 30:
0.217 install.sh: return: line 36: Illegal number: 0
```
查看文本格式
```
$ cat -A install.sh
M-oM-;M-?#!/bin/sh^M$
^M$
export MC="-j$(nproc)"^M$
^M$
echo "============================================"^M$
echo "Install extensions from : install.sh"^M$
echo "PHP version : ${PHP_VERSION}"^M$
echo "Work directory : ${PWD}"^M$
echo "============================================"^M$
echo^M$
^M$
export EXTENSIONS="gd,bcmath,pdo,mysqli,pdo_mysql,redis,bz2,calendar,opcache,pcntl,sockets,amqp,zip,soap,event,"^M$
^M$
#^M$
# Check if current php version is greater than or equal to^M$
# specific version.^M$
#^M$
# For example, to check if current php is greater than or^M$
# equal to PHP 7.0:^M$
#^M$
# isPhpVersionGreaterOrEqual 8 0^M$
#^M$
# Param 1: Specific PHP Major version^M$
# Param 2: Specific PHP Minor version^M$
# Return : 1 if greater than or equal to, 0 if less than^M$
```
> dos2unix install.sh 转换
2 changes: 1 addition & 1 deletion extension/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ isPhpVersionGreaterOrEqual() {
# else
# return 0;
# fi
return 0;
return 0
}

#
Expand Down

0 comments on commit 6387096

Please sign in to comment.