GithubHelp home page GithubHelp logo

docker-nginx-php-fpm's Introduction

Docker: nginx + php-fpm

Circle CI

Docker Nginx & PHP-FPM image built on Alpine Linux micro OS with the final image size of 58 MB vs. 100+ MB compared to the Ubuntu / Debian equivalent. It's intended to be used as a base image for building final app images ready for deployment, but can be used as is and configured via volumes.

Running

Pull or build the image yourself and run it. Before you do that you'll need to configure Nginx and have the application ready for "dockerisation". Both can be passed using mounted volumes or baked right into the image during the build.

# Build
docker build -t ianbytchek/nginx-php-fpm .

# Or pull
docker pull ianbytchek/nginx-php-fpm

# Run
docker run -d -p 80:80 -p 443:443 --name app ianbytchek/nginx-php-fpm

# Run with a mounted volume
docker run -d -p 80:80 -p 443:443 -v $PATH:/docker/configuration --name app ianbytchek/nginx-php-fpm

Bonus

# Connect to an existing container.
docker exec -ti haproxy sh
 
# Remove exited containers.
docker ps -a | grep 'Exited' | awk '{print $1}' | xargs docker rm
 
# Remove intermediary and unused images.
docker rmi $(docker images -aq -f "dangling=true")

docker-nginx-php-fpm's People

Contributors

iby avatar

Watchers

 avatar

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.