CentOS
Faliyet alani, sahne
Ben Centos Docker PHP yükledim, bu benim DockerFile:
FROM centos:7.6.1810
LABEL maintainer="teran.a.joan@gmail.com"
RUN yum install httpd-2.4.6-88.el7.centos -y
RUN rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
RUN rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
RUN yum install php72w -y
ENTRYPOINT ["/usr/sbin/httpd", "-D", "FOREGROUND"]
Uygulama, json_decode ve json_encode ile aynı hatayı döndürdü
çözüm
Json_encode ve json_decode olan PHP Common'u yükleyin
yum install -y php72w-common-7.2.14-1.w7.x86_64
Çözünürlük nasıl bulunur?
API için kapsayıcı oluşturmak başka bir Docker dosya var ve php-mysql istemci yükleme sırası vardır:
yum install php72w-mysql.x86_64 -y
Uygulamayı monte etmek için bu görüntüyü kullanırsanız, json_encode ve json_decode çalışır !! Tamam ..... Bunun ne gibi bağımlılıkları var?
[root@c023b46b720c etc]# yum install php72w-mysql.x86_64
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
* base: mirror.gtdinternet.com
* epel: mirror.globo.com
* extras: linorg.usp.br
* updates: mirror.gtdinternet.com
* webtatic: us-east.repo.webtatic.com
Resolving Dependencies
--> Running transaction check
---> Package php72w-mysql.x86_64 0:7.2.14-1.w7 will be installed
--> Processing Dependency: php72w-pdo(x86-64) for package: php72w-mysql-7.2.14-1.w7.x86_64
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: php72w-mysql-7.2.14-1.w7.x86_64
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: php72w-mysql-7.2.14-1.w7.x86_64
--> Running transaction check
---> Package mariadb-libs.x86_64 1:5.5.60-1.el7_5 will be installed
---> Package php72w-pdo.x86_64 0:7.2.14-1.w7 will be installed
--> Processing Dependency: php72w-common(x86-64) = 7.2.14-1.w7 for package: php72w-pdo-7.2.14-1.w7.x86_64
--> Running transaction check
---> Package php72w-common.x86_64 0:7.2.14-1.w7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
========================================================================================================
Package Arch Version Repository Size
========================================================================================================
Installing:
php72w-mysql x86_64 7.2.14-1.w7 webtatic 82 k
Installing for dependencies:
mariadb-libs x86_64 1:5.5.60-1.el7_5 base 758 k
php72w-common x86_64 7.2.14-1.w7 webtatic 1.3 M
php72w-pdo x86_64 7.2.14-1.w7 webtatic 89 k
Transaction Summary
========================================================================================================
Install 1 Package (+3 Dependent packages)
Total download size: 2.2 M
Installed size: 17 M
Is this ok [y/d/N]: y
Downloading packages:
(1/4): mariadb-libs-5.5.60-1.el7_5.x86_64.rpm | 758 kB 00:00:00
(2/4): php72w-mysql-7.2.14-1.w7.x86_64.rpm | 82 kB 00:00:01
(3/4): php72w-pdo-7.2.14-1.w7.x86_64.rpm | 89 kB 00:00:01
(4/4): php72w-common-7.2.14-1.w7.x86_64.rpm | 1.3 MB 00:00:06
--------------------------------------------------------------------------------------------------------
Total 336 kB/s | 2.2 MB 00:00:06
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : 1:mariadb-libs-5.5.60-1.el7_5.x86_64 1/4
Installing : php72w-common-7.2.14-1.w7.x86_64 2/4
Installing : php72w-pdo-7.2.14-1.w7.x86_64 3/4
Installing : php72w-mysql-7.2.14-1.w7.x86_64 4/4
Verifying : php72w-common-7.2.14-1.w7.x86_64 1/4
Verifying : 1:mariadb-libs-5.5.60-1.el7_5.x86_64 2/4
Verifying : php72w-pdo-7.2.14-1.w7.x86_64 3/4
Verifying : php72w-mysql-7.2.14-1.w7.x86_64 4/4
Installed:
php72w-mysql.x86_64 0:7.2.14-1.w7
Dependency Installed:
mariadb-libs.x86_64 1:5.5.60-1.el7_5 php72w-common.x86_64 0:7.2.14-1.w7
php72w-pdo.x86_64 0:7.2.14-1.w7
Complete!
Evet! Bağımlılıkların içinde ortak paketler var. Diğer kabıma kurdum ve işe yarıyor! Sonra, Do Direktifi DockerFile içine koydum, Git taahhüt !! Git Etiketi !!!! Git Push !!!! Hazır!
disable_functions
olup olmadığını görmek için ini yönergesini kontrol edinjson_decode