From 4a48cf0e35b80f9e4aad17ab45e9df3816e40237 Mon Sep 17 00:00:00 2001
From: Alan Nelson <alan.nelson@nebraska.edu>
Date: Fri, 18 Oct 2019 15:40:36 +0000
Subject: [PATCH] Add PHP linter for 7.3

---
 Makefile                     | 20 +++++++++++++-------
 README.md                    | 12 ++++++++++--
 php-lint/7.3/Dockerfile      | 21 +++++++++++++++++++++
 php-unit-test/7.0/Dockerfile |  2 +-
 php-unit-test/7.1/Dockerfile |  2 +-
 php-unit-test/7.2/Dockerfile |  2 +-
 php-unit-test/7.3/Dockerfile | 22 ++++++++++++++++++++++
 7 files changed, 69 insertions(+), 12 deletions(-)
 create mode 100644 php-lint/7.3/Dockerfile
 create mode 100644 php-unit-test/7.3/Dockerfile

diff --git a/Makefile b/Makefile
index cdbfa1b..15eecf3 100644
--- a/Makefile
+++ b/Makefile
@@ -24,8 +24,8 @@ all: php-lint php-unit-test magento2 mobile static-code-analysis utility detect-
 
 # Image Groups
 ####################
-php-lint: php-lint_5.6 php-lint_7.0 php-lint_7.1 php-lint_7.2 php-lint_latest
-php-unit-test: php-unit-test_5.6 php-unit-test_7.0 php-unit-test_7.1 php-unit-test_7.2 php-unit-test_latest
+php-lint: php-lint_5.6 php-lint_7.0 php-lint_7.1 php-lint_7.2 php-lint_7.3 php-lint_latest
+php-unit-test: php-unit-test_5.6 php-unit-test_7.0 php-unit-test_7.1 php-unit-test_7.2 php-unit-test_7.3 php-unit-test_latest
 magento2: magento2-unit-test magento2-xml-lint
 mobile: android-build-server
 static-code-analysis: static-code-analysis_latest static-code-analysys_php static-code-analysys_python static-code-analysys_android
@@ -44,9 +44,12 @@ php-lint_7.1: php-lint/7.1/Dockerfile
 
 php-lint_7.2: php-lint/7.2/Dockerfile
 	docker build $(BUILD_ARGS) -t ${REPO_ORG}/php-lint:7.2 -f php-lint/7.2/Dockerfile php-lint
+	
+php-lint_7.3: php-lint/7.3/Dockerfile
+	docker build $(BUILD_ARGS) -t ${REPO_ORG}/php-lint:7.3 -f php-lint/7.3/Dockerfile php-lint
 
-php-lint_latest: php-lint_7.2
-	docker tag  ${REPO_ORG}/php-lint:7.2 ${REPO_ORG}/php-lint:latest
+php-lint_latest: php-lint_7.3
+	docker tag  ${REPO_ORG}/php-lint:7.3 ${REPO_ORG}/php-lint:latest
 
 # PHP Unit Test Images
 ####################
@@ -62,8 +65,11 @@ php-unit-test_7.1: php-unit-test/7.1/Dockerfile
 php-unit-test_7.2: php-unit-test/7.2/Dockerfile
 	docker build $(BUILD_ARGS) -t ${REPO_ORG}/php-unit-test:7.2 -f php-unit-test/7.2/Dockerfile php-unit-test
 
-php-unit-test_latest: php-unit-test_7.2
-	docker tag ${REPO_ORG}/php-unit-test:7.2 ${REPO_ORG}/php-unit-test:latest
+php-unit-test_7.3: php-unit-test/7.3/Dockerfile
+	docker build $(BUILD_ARGS) -t ${REPO_ORG}/php-unit-test:7.3 -f php-unit-test/7.3/Dockerfile php-unit-test
+
+php-unit-test_latest: php-unit-test_7.3
+	docker tag ${REPO_ORG}/php-unit-test:7.3 ${REPO_ORG}/php-unit-test:latest
 
 # Application Images
 ####################
@@ -136,7 +142,7 @@ README_HEAD = `cat ./_README.md | sed -e '/%CONTAINERS_LIST%/Q'`
 README_TAIL = `cat ./_README.md | sed -e '1,/%CONTAINERS_LIST%/d'`
 README_FOOTER = `echo "\n\r_Last update: \`date\`_\n"`
 update_readme:
-	@echo "$(README_HEAD)  \n\n$(TOOLSET) \n $(README_TAIL) \n$(README_FOOTER)" > README.md
+	@echo -e "$(README_HEAD)  \n\n$(TOOLSET) \n $(README_TAIL) \n$(README_FOOTER)" > README.md
 	@git add README.md
 
 delete_dangling_images:
diff --git a/README.md b/README.md
index 23b1308..9ad7313 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,9 @@
 To build these images, clone this repository onto a machine with docker and make installed. Run `make` and all of the images will be built and installed as local docker images.  
 This file is automatically updated after execute `git commit` based on the content of file `_README.md` To enable this feature, execute `.dev/bootstrap.sh` after cloning the repo.
 
-### Available tools    \n\n- its-registry.unl.edu/unl-its/docker-ci/alpine-ssh-client:latest
+### Available tools    
+
+- its-registry.unl.edu/unl-its/docker-ci/alpine-ssh-client:latest
 - its-registry.unl.edu/unl-its/docker-ci/android-build-server:latest
 - its-registry.unl.edu/unl-its/docker-ci/dependency-check
 - its-registry.unl.edu/unl-its/docker-ci/detect-secrets
@@ -19,11 +21,17 @@ This file is automatically updated after execute `git commit` based on the conte
 - its-registry.unl.edu/unl-its/docker-ci/php-lint:7.0
 - its-registry.unl.edu/unl-its/docker-ci/php-lint:7.1
 - its-registry.unl.edu/unl-its/docker-ci/php-lint:7.2
+- its-registry.unl.edu/unl-its/docker-ci/php-lint:7.3
 - its-registry.unl.edu/unl-its/docker-ci/php-unit-test:5.6
 - its-registry.unl.edu/unl-its/docker-ci/php-unit-test:7.0
 - its-registry.unl.edu/unl-its/docker-ci/php-unit-test:7.1
 - its-registry.unl.edu/unl-its/docker-ci/php-unit-test:7.2
+- its-registry.unl.edu/unl-its/docker-ci/php-unit-test:7.3
 - its-registry.unl.edu/unl-its/docker-ci/static-code-analysis:android
 - its-registry.unl.edu/unl-its/docker-ci/static-code-analysis:latest
 - its-registry.unl.edu/unl-its/docker-ci/static-code-analysis:php
-- its-registry.unl.edu/unl-its/docker-ci/static-code-analysis:python \n    \n\n\r_Last update: Mon Sep 23 13:08:00 CDT 2019_\n
+- its-registry.unl.edu/unl-its/docker-ci/static-code-analysis:python 
+    
+
+
_Last update: Mon Oct 14 15:01:14 CDT 2019_
+
diff --git a/php-lint/7.3/Dockerfile b/php-lint/7.3/Dockerfile
new file mode 100644
index 0000000..76089ee
--- /dev/null
+++ b/php-lint/7.3/Dockerfile
@@ -0,0 +1,21 @@
+FROM php:7.3-alpine
+
+ARG BUILD_DATE
+ARG VCS_REF
+ARG VERSION
+LABEL org.label-schema.build-date=$BUILD_DATE \
+      org.label-schema.name="PHP 7.3 linter" \
+      org.label-schema.description="" \
+      org.label-schema.vcs-ref=$VCS_REF \
+      org.label-schema.vendor="University of Nebraska - Lincoln" \
+      org.label-schema.version=$VERSION \
+      org.label-schema.schema-version="1.0" \
+      maintainer="Alan Nelson <alan.nelson@nebraska.edu>"
+
+RUN apk add --no-cache bash
+
+COPY php-lint docker-entrypoint /usr/local/bin/
+RUN chmod 755 /usr/local/bin/docker-entrypoint /usr/local/bin/php-lint
+
+ENTRYPOINT ["docker-entrypoint"]
+CMD ["--help"]
diff --git a/php-unit-test/7.0/Dockerfile b/php-unit-test/7.0/Dockerfile
index 8ef133b..7b46b06 100644
--- a/php-unit-test/7.0/Dockerfile
+++ b/php-unit-test/7.0/Dockerfile
@@ -4,7 +4,7 @@ ARG BUILD_DATE
 ARG VCS_REF
 ARG VERSION
 LABEL org.label-schema.build-date=$BUILD_DATE \
-      org.label-schema.name="PHP 5.6 Unit Tester" \
+      org.label-schema.name="PHP 7.0 Unit Tester" \
       org.label-schema.description="" \
       org.label-schema.vcs-ref=$VCS_REF \
       org.label-schema.vendor="University of Nebraska - Lincoln" \
diff --git a/php-unit-test/7.1/Dockerfile b/php-unit-test/7.1/Dockerfile
index 43734ca..39f35b9 100644
--- a/php-unit-test/7.1/Dockerfile
+++ b/php-unit-test/7.1/Dockerfile
@@ -4,7 +4,7 @@ ARG BUILD_DATE
 ARG VCS_REF
 ARG VERSION
 LABEL org.label-schema.build-date=$BUILD_DATE \
-      org.label-schema.name="PHP 5.6 Unit Tester" \
+      org.label-schema.name="PHP 7.1 Unit Tester" \
       org.label-schema.description="" \
       org.label-schema.vcs-ref=$VCS_REF \
       org.label-schema.vendor="University of Nebraska - Lincoln" \
diff --git a/php-unit-test/7.2/Dockerfile b/php-unit-test/7.2/Dockerfile
index 7edf64a..cf2dbb9 100644
--- a/php-unit-test/7.2/Dockerfile
+++ b/php-unit-test/7.2/Dockerfile
@@ -4,7 +4,7 @@ ARG BUILD_DATE
 ARG VCS_REF
 ARG VERSION
 LABEL org.label-schema.build-date=$BUILD_DATE \
-      org.label-schema.name="PHP 5.6 Unit Tester" \
+      org.label-schema.name="PHP 7.2 Unit Tester" \
       org.label-schema.description="" \
       org.label-schema.vcs-ref=$VCS_REF \
       org.label-schema.vendor="University of Nebraska - Lincoln" \
diff --git a/php-unit-test/7.3/Dockerfile b/php-unit-test/7.3/Dockerfile
new file mode 100644
index 0000000..cac62c0
--- /dev/null
+++ b/php-unit-test/7.3/Dockerfile
@@ -0,0 +1,22 @@
+FROM php:7.3-alpine
+
+ARG BUILD_DATE
+ARG VCS_REF
+ARG VERSION
+LABEL org.label-schema.build-date=$BUILD_DATE \
+      org.label-schema.name="PHP 7.3 Unit Tester" \
+      org.label-schema.description="" \
+      org.label-schema.vcs-ref=$VCS_REF \
+      org.label-schema.vendor="University of Nebraska - Lincoln" \
+      org.label-schema.version=$VERSION \
+      org.label-schema.schema-version="1.0" \
+      maintainer="Alan Nelson <alan.nelson@nebraska.edu>"
+
+RUN apk add --no-cache bash nodejs nodejs-npm $PHPIZE_DEPS \
+    && pecl install xdebug redis \
+    && docker-php-ext-enable xdebug redis \
+    && apk del --no-cache $PHPIZE_DEPS
+RUN curl -o /usr/local/bin/composer https://getcomposer.org/composer.phar \
+  && chmod 755 /usr/local/bin/composer
+
+CMD ["bash"]
-- 
GitLab