Giter Site home page Giter Site logo

docker-php-5.3-apache's Introduction

PHP 5.3 Apache

PHP 5.3 reached EOL on 14 Aug 2014 and thus, official docker support was dropped. I still needed to run 5.3 so I built this image based on the latest official builds of PHP.

What is PHP?

PHP is a server-side scripting language designed for web development, but which can also be used as a general-purpose programming language. PHP can be added to straight HTML or it can be used with a variety of templating engines and web frameworks. PHP code is usually processed by an interpreter, which is either implemented as a native module on the web-server or as a common gateway interface (CGI).

wikipedia.org/wiki/PHP

logo

How to use this image.

With Command Line

For PHP projects run through the command line interface (CLI), you can do the following.

Create a Dockerfile in your PHP project

FROM eugeneware/php-5.3
COPY . /usr/src/myapp
WORKDIR /usr/src/myapp
CMD [ "php", "./your-script.php" ]

Then, run the commands to build and run the Docker image:

docker build -t my-php-app .
docker run -it --rm --name my-running-app my-php-app

Run a single PHP script

For many simple, single file projects, you may find it inconvenient to write a complete Dockerfile. In such cases, you can run a PHP script by using the PHP Docker image directly:

docker run -it --rm --name my-running-script -v "$PWD":/usr/src/myapp -w /usr/src/myapp eugeneware/php-5.3 php your-script.php

Installing modules

To install additional modules use a Dockerfile like this:

FROM eugeneware:php-5.3

# Installs curl
RUN docker-php-ext-install curl

Then build the image:

$ docker build -t my-php .

Without a Dockerfile

If you don't want to include a Dockerfile in your project, it is sufficient to do the following:

docker run -it --rm --name my-php-fpm-app -v "$PWD":/var/www/html eugeneware/php-5.3

Credits

A big credit to helderco for the fpm version of this image.

License

View license information for the software contained in this image.

docker-php-5.3-apache's People

Contributors

eugeneware avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

docker-php-5.3-apache's Issues

This will not work

The command '/bin/sh -c gpg --keyserver pgp.mit.edu --recv-keys 0B96609E270F565C13292B24C13C70B87267B52D 0A95E9A026542D53835E3F3A7DEC4E69FC9C83D7' returned a non-zero code: 2
this is error shows

Can't install bcmath through docker-php-ext-install

When I try to install the module bcmath through docker-php-ext-install I get the following error:

Build complete.
Don't forget to run 'make test'.

Installing shared extensions:     /usr/local/lib/php/extensions/no-debug-non-zts-20090626/
docker-php-ext-enable bcmath.so
/usr/local/bin/docker-php-ext-enable: line 61: /usr/local/etc/php/conf.d/docker-php-ext-bcmath.ini: No such file or directory

Do you have any advice how to fix it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.