Skip to content

Instantly share code, notes, and snippets.

@balintsera
Last active February 20, 2017 06:46
Show Gist options
  • Save balintsera/289601b8888da006f1681e3775cac2f2 to your computer and use it in GitHub Desktop.
Save balintsera/289601b8888da006f1681e3775cac2f2 to your computer and use it in GitHub Desktop.
PHP (any version) for local development
# Replace image tag (after the semicolon) with whatever version you need
FROM php:5.6-cli
EXPOSE 8080
# Legacy and oldschool apps like Wordpress needs this extension
# RUN docker-php-ext-install mysqli
WORKDIR /usr/src/myapp
# 0.0.0.0 is important: this way the server will response with any request from the outside
CMD ["php", "-S", "0.0.0.0:8080" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment