Thread: Docker and PHP

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    82
    Rep Power
    5

    Docker and PHP


    Have any used Docker for work or for professional use? I want to setup Docker for a laravel but I am having issues wrapping my head around it.

    1. Is the point of Docker to make environments shareable without the need/hassle of creating a VM. So if I want a LAMP stack on my production server, I would create a container (containing Linux, Apache, MySQL, Redis, etc...) then share it with everyone who's working on the project?

    2. For using a CI / CD service like Codeship or Travis CI, I would have to upload the DockerFile onto their systems so when I push via git, it would build out the environment then run the test cases?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2015
    Posts
    50
    Rep Power
    2
    Is the point of Docker to make environments shareable without the need/hassle of creating a VM
    Pretty much.

    So if I want a LAMP stack on my production server, I would create a container (containing Linux, Apache, MySQL, Redis, etc...) then share it with everyone who's working on the project?
    Yep. And with that, you have the gain of versions being the same across everything. Laravel has its own VM dev environment if you'd prefer to use that, but I don't think it's as configurable as your own docker image.

    For using a CI / CD service like Codeship or Travis CI, I would have to upload the DockerFile onto their systems so when I push via git, it would build out the environment then run the test cases?
    You are correct indeed.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2015
    Posts
    50
    Rep Power
    2
    It turns out I just stumbled upon Laradock which creates docker containers with plenty of great things.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    82
    Rep Power
    5
    Yea. I am using Laradock for my projects. Thanks!
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2017
    Posts
    1
    Rep Power
    0
    Hey there! I'm the developer advocate at Codeship.

    I wrote some tutorials about this exact thing that you may find interesting.

    Using Docker Compose for PHP Development
    https://blog.codeship.com/using-dock...p-development/

    Using Codeship for PHP Application Deployments
    https://blog.codeship.com/using-code...n-deployments/

IMN logo majestic logo threadwatch logo seochat tools logo