Create a development environment for Laravel in Docker

I have a custom Laravel installation on my Ubuntu machine. As per Laravel’s instructions however, I didn’t use Homestead to spin up my app. Instead I installed the app using composer on my machine and then installed the dependencies and libraries as per the requirement.

Now I want to use another machine for development. How’s it possible using Docker to package a replica of my machine’s environment to create a container to be used on the other machine. I am new to Docker and haven’t used it before for whatsoever reasons.

  • docker add “requires at least one argument” error
  • How can I update DOCKER_OPTS in docker-machine permanently
  • Docker image (Ubuntu: Netbeans, MySql Server)
  • Can't see files with Docker on Windows 10
  • neo4j-mazerunner, How to Increase memory size in docker-compose.yml
  • Docker Ubuntu Behind Proxy
  • Apache Kafka on Docker - stops after few hundred pools
  • Linking container with docker-compose
  • 'sbt ~run' shows that it's recompiling, but no changes visible
  • How can I gracefully recover from an attached Docker container terminating?
  • ADD command not working Docker
  • Can not resolve hostname in Docker 1.10
  • 2 Solutions collect form web for “Create a development environment for Laravel in Docker”

    Have you considered using Laravel Valet? It’s a lot more light weight than Docker and Homestead and can spin up your projects almost instantaneously.

    If you wish to persist with Docker then Laradock has probably figured out most of what you wish to use.

    I created a barebones Docker Compose repo that can be used for Laravel or as a LAMP Server and it comes with:

    • Apache
    • PHP
    • MySQL
    • Composer
    • PHPMyAdmin

    Most of the ones I came across are pretty bloated with stuff that I didn’t need.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.