From 8dc83ea0e13c288152386ed4ed76eaef32b6b629 Mon Sep 17 00:00:00 2001 From: Victor Rubezhny Date: Fri, 3 May 2019 09:16:40 +0200 Subject: [PATCH] Docker image for PHP Language Support and Debugger Based on che-theia-endpoint-runtime image. Includes the following php7 packages: php7 php7-fpm php7-opcache php7-gd php7-mysqli php7-zlib php7-curl php7-xdebug In order to be used for VSCode PHP Language Support and Debugger extensions, it should be built using `--tag=next` which will add the support for node:10.15 and the latest VSCode API support required to run the mentioned VSCode extensions. Issue: https://github.com/eclipse/che/issues/12772 Signed-off-by: Victor Rubezhny --- dockerfiles/remote-plugin-php7/Dockerfile | 26 +++++++++++++++++++++++ dockerfiles/remote-plugin-php7/build.sh | 15 +++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 dockerfiles/remote-plugin-php7/Dockerfile create mode 100755 dockerfiles/remote-plugin-php7/build.sh diff --git a/dockerfiles/remote-plugin-php7/Dockerfile b/dockerfiles/remote-plugin-php7/Dockerfile new file mode 100644 index 000000000..72fd224c1 --- /dev/null +++ b/dockerfiles/remote-plugin-php7/Dockerfile @@ -0,0 +1,26 @@ +# Copyright (c) 2019 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation + +FROM ${BUILD_ORGANIZATION}/${BUILD_PREFIX}-theia-endpoint-runtime:${BUILD_TAG} + +RUN apk --update --no-cache add \ + ca-certificates \ + php7 php7-fpm php7-opcache \ + php7-gd php7-mysqli php7-zlib php7-curl \ + && apk --update --no-cache add \ + php7-xdebug --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ \ + && echo "zend_extension=$(find /usr/lib/php7/modules/ -name xdebug.so)" > /etc/php7/php.ini \ + && echo "xdebug.coverage_enable=0" >> /etc/php7/php.ini \ + && echo "xdebug.remote_enable=1" >> /etc/php7/php.ini \ + && echo "xdebug.remote_connect_back=1" >> /etc/php7/php.ini \ + && echo "xdebug.remote_log=/tmp/xdebug.log" >> /etc/php7/php.ini \ + && echo "xdebug.remote_autostart=true" >> /etc/php7/php.ini + +WORKDIR /projects diff --git a/dockerfiles/remote-plugin-php7/build.sh b/dockerfiles/remote-plugin-php7/build.sh new file mode 100755 index 000000000..4c77f7e5e --- /dev/null +++ b/dockerfiles/remote-plugin-php7/build.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# +# Copyright (c) 2019 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# + +base_dir=$(cd "$(dirname "$0")"; pwd) +. "${base_dir}"/../build.include + +init --name:remote-plugin-php7 "$@" +build