summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2022-11-25 10:18:07 +0100
committerRemi Collet <remi@php.net>2022-11-25 10:18:07 +0100
commitf10575db35df41ce9492d38b9b0ced9991092fae (patch)
tree90378a36b0515a4339336d5bb6a143d044749ba6
parent65c599a7b649423d185bfa950630d54e25ad19de (diff)
add some amzn2 Dockerfile to test ldap issue
-rw-r--r--amzn2-php74.dockerfile24
-rw-r--r--amzn2-php82.dockerfile24
-rw-r--r--ldap.php4
3 files changed, 52 insertions, 0 deletions
diff --git a/amzn2-php74.dockerfile b/amzn2-php74.dockerfile
new file mode 100644
index 0000000..061d38d
--- /dev/null
+++ b/amzn2-php74.dockerfile
@@ -0,0 +1,24 @@
+FROM amazonlinux:2
+
+RUN yum update -y
+
+# Import archive signing keys and update packages
+RUN rpm --import https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7 && \
+ rpm --import https://rpms.remirepo.net/RPM-GPG-KEY-remi && \
+ yum install -y yum-utils && \
+ yum update -y
+
+RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
+ https://rpms.remirepo.net/enterprise/remi-release-7.rpm && \
+ yum-config-manager --enable remi-php74 && \
+ yum install -y --setopt=tsflags=nodocs --noplugins \
+ php-cli php-ldap && \
+ yum clean all
+
+RUN php --modules && php --version
+
+COPY ldap.php /tmp/ldap.php
+RUN php /tmp/ldap.php
+
+ENTRYPOINT ["php"]
+CMD ["-a"]
diff --git a/amzn2-php82.dockerfile b/amzn2-php82.dockerfile
new file mode 100644
index 0000000..4df5fc6
--- /dev/null
+++ b/amzn2-php82.dockerfile
@@ -0,0 +1,24 @@
+FROM amazonlinux:2
+
+RUN yum update -y
+
+# Import archive signing keys and update packages
+RUN rpm --import https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7 && \
+ rpm --import https://rpms.remirepo.net/RPM-GPG-KEY-remi && \
+ yum install -y yum-utils && \
+ yum update -y
+
+RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
+ https://rpms.remirepo.net/enterprise/remi-release-7.rpm && \
+ yum-config-manager --enable remi-php82-test && \
+ yum install -y --setopt=tsflags=nodocs --noplugins \
+ php-cli php-ldap && \
+ yum clean all
+
+RUN php --modules && php --version
+
+COPY ldap.php /tmp/ldap.php
+RUN php /tmp/ldap.php
+
+ENTRYPOINT ["php"]
+CMD ["-a"]
diff --git a/ldap.php b/ldap.php
new file mode 100644
index 0000000..7e428be
--- /dev/null
+++ b/ldap.php
@@ -0,0 +1,4 @@
+<?php
+
+var_dump($connection = ldap_connect("ldaps://ldap.google.com"));
+var_dump($bind_results = ldap_bind($connection, 'AnyUsername','AnyPassword'));