-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP Stack #13307
Comments
As an image I've tried to use php:7-apache which contains Apache Web server which is needed for samples (Hello World).
I think all these problems we can solve by creating new image to extend official and make all needed changes in our Dockerfile. |
@svor your problem is the same problem we have faced for other stacks: the official images that we found on docker hub are not suited for development on an unprivileged kubernetes pod (i.e. the default on openshift). I would like to avoid to create and maintain a new PHP image and my recommendation would be to look at the official s2i image https://github.com/sclorg/s2i-php-container that are designed to be run on unprivileged pods. That image should be just fine to run the PHP LS. Anyway it's not clear from your description but what we agreed with @tolusha is that you should use 2 separate containers: one for the LS and one for runtime container (aka the recipe). The image can be the same (i.e. the official s2i image) or, if your runtime container needs some prerequisites that are not in the LS image, you can create a custom image that use the LS image as it's base image (i.e. |
After my investigation I think we can't just reuse existing official image: https://hub.docker.com/r/centos/php-70-centos7 or https://hub.docker.com/_/php because of:
|
@svor I don't see any other alternative so let's proceed this way |
@l0rd All samples except HelloWorld require database. As I understand the database should be run in a different container. So, the "recipe": {
"contentType": "text/x-yaml",
"type": "kubernetes",
"content": ""
} Am I right? |
@svor correct. But I would use 2 different stacks: "recipe": {
"content": "apiVersion: v1\nkind: List\nitems:\n- apiVersion: apps/v1\n kind: Deployment\n metadata:\n labels:\n name: java-postgres-stack\n name: java-postgres-stack\n spec:\n replicas: 1\n selector:\n matchLabels:\n name: java-postgres-stack\n template:\n metadata:\n labels:\n name: java-postgres-stack\n name: java-postgres-stack\n spec:\n containers:\n - image: postgres\n name: postgres\n ports:\n - name: postgres\n containerPort: 5432\n hostPort: 5432\n - image: maven\n command: ['sleep']\n args: ['infinity']\n name: maven\n ports:\n - containerPort: 8080\n name: http-server\n",
"type": "kubernetes",
"contentType": "application/x-yaml"
} |
Make a PHP stack with examples as described in #12620
The text was updated successfully, but these errors were encountered: