Giter VIP home page Giter VIP 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 orsolin/php:5.3-apache
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 orsolin/php:5.3-apache php your-script.php

Installing modules

To install additional modules use a Dockerfile like this:

FROM orsolin/php:5.3-apache

# 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-app -v "$PWD":/var/www/html orsolin/php:5.3-apache

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

cristianorsolin avatar

Stargazers

 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

Docker build error OPENSSL exit code: 60

Hello, for some specific reason I need to build the docker image from fresh, and I encountered the following issue when building openssl:

=> ERROR [11/16] RUN CFLAGS="-fPIC" && OPENSSL_VERSION="1.0.2d" && TLD_SUFFIX=loc       && cd /tmp       && mkdir openssl       && curl -sL "https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz" -o openss  0.4s
------
 > [11/16] RUN CFLAGS="-fPIC" && OPENSSL_VERSION="1.0.2d" && TLD_SUFFIX=loc       && cd /tmp       && mkdir openssl       && curl -sL "https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz" -o openssl.tar.gz       && curl -sL "https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz.asc" -o openssl.tar.gz.asc       && gpg --verify openssl.tar.gz.asc       && tar -xzf openssl.tar.gz -C openssl --strip-components=1       && cd /tmp/openssl       && ./config -fPIC && make && make install       && rm -rf /tmp/*:
------
executor failed running [/bin/sh -c CFLAGS="-fPIC" && OPENSSL_VERSION="1.0.2d"      && cd /tmp       && mkdir openssl       && curl -sL "https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz" -o openssl.tar.gz       && curl -sL "https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz.asc" -o openssl.tar.gz.asc       && gpg --verify openssl.tar.gz.asc       && tar -xzf openssl.tar.gz -C openssl --strip-components=1       && cd /tmp/openssl       && ./config -fPIC && make && make install       && rm -rf /tmp/*]: exit code: 60

Any idea how this can be resolved? I know this is an old php dockerfile so maybe there is some issue with openssl?

Thanks.

Can't enable Jpeg support in gd extension

I tried to enable jpeg support in the GD extension, but it didn't work:

RUN apt-get update --fix-missing
RUN apt-get install -y libjpeg62-turbo-dev

RUN docker-php-ext-configure gd --with-jpeg-dir=/usr/include/ \
    && docker-php-ext-install gd

As a result, once the container is built, JPEG support is not enabled:

php -r 'print_r(gd_info());'
Array
(
    [GD Version] => bundled (2.1.0 compatible)
    [FreeType Support] => 
    [T1Lib Support] => 
    [GIF Read Support] => 1
    [GIF Create Support] => 1
    [JPEG Support] => 
    [PNG Support] => 1
    [WBMP Support] => 1
    [XPM Support] => 
    [XBM Support] => 1
    [JIS-mapped Japanese Font Support] => 
)

Is there a recommended way to configure GD with JPG support on this image of PHP 5.3?

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.