Skip to content

Latest commit

 

History

History
35 lines (22 loc) · 944 Bytes

README.md

File metadata and controls

35 lines (22 loc) · 944 Bytes

PHP Docker Build Helloworld Example

This is an example php application, which can be deployed to APPUiO using the following commands

How to deploy

CLI / oc Client

Create New OpenShift Project

oc new-project example-php-dockerfile-helloworld

Create Application and expose Service

oc new-app https://github.com/appuio/example-php-docker-helloworld.git --strategy=docker --name=appuio-php-docker-ex

oc expose service appuio-php-docker-ex

Build and run the image

Build the image:

buildah build-using-dockerfile -t appuio/example-php-docker-helloworld:latest .

Run it locally with the following command. Beware that --rmi automatically removes the built image when the container stops, so you either have to rebuild it or remove the parameter from the command.

podman run --rm --rmi --interactive --publish 8080:8080 localhost/appuio/example-php-docker-helloworld