Skip to content
This repository was archived by the owner on Oct 3, 2024. It is now read-only.

Latest commit

 

History

History
77 lines (53 loc) · 2.14 KB

README.md

File metadata and controls

77 lines (53 loc) · 2.14 KB

Hello Dockerized World 👋🐋🌍

TL;DR

$ git clone [email protected]:liteacz/hello-dockerized-world.git

# Try one of the examples

# Simple PHP
$ cd hello-dockerized-world/examples/php

# or complex Laravel application
# cd hello-dockerized-world/examples/laravel

# or a Symfony project
# cd hello-dockerized-world/examples/symfony

# Start the project
$ docker-compose up -d

# Open up the page in your favorite browser
$ firefox localhost:8000

About this project

This is a simple showcase of our php fpm and nginx images playing together in a simple PHP application that can be run without any other dependencies besides docker.

Usage

  1. Make sure you've got docker and docker-compose installed.

     $ docker --version
     # You should get something similar to this
     Docker version 18.09.5, build e8ff056
    
     $ docker-compose --version
     # ...and this.
     docker-compose version 1.23.2, build 1110ad01
    
  2. Clone the code

    $ git clone [email protected]:liteacz/hello-dockerized-world.git
    # Chose one of the examples
    $ cd hello-dockerized-world/examples/php
  3. Spin up the containers

    $ docker-compose up -d
    # For the first run, this wil take a minute to download 
    # php and nginx images. Subsequent calls will be much faster
    # so do not worry.
  4. That's it! Really... No need for PHP nor Nginx installed on your system. Now head to http://localhost:8000 and see the PHP web page yourself.

  5. Do not forget to stop the containers when you're done.

    $ docker-compose down
    Stopping hello-dockerized-world_nginx_1   ... done
    Stopping hello-dockerized-world_php-fpm_1 ... done
    Removing hello-dockerized-world_nginx_1   ... done
    Removing hello-dockerized-world_php-fpm_1 ... done
    Removing network hello-dockerized-world_default

What's next

For more information on how to work with dockerized development environment visit the liteacz/php project.