How to create Docker image,Dockerfile of LAravel application from existing docker environment for Laravel

I have dockervel environment ,docker container for Laravel , and I really struggled to make it work on my machine.

The way I used the dockervel image is described here http://www.spiralout.eu/2015/12/dockervel-laravel-development.html

  • Is it possible to take thread dump of a java process in the container from the host?
  • How to properly share a folder between few docker containers in read mode?
  • how to install global angular-cli inside docker container?
  • How to change Docker ENV var?
  • Ansible and docker-py
  • PID 1 in Docker persistance
  • I have developed an application including Behat for BDD and PHPUnit testing in this environment and I have to make an image from it and say how to use It. I am confused how to create Dockerfile ?

    any help is appreciated

  • openconnect in dockers/IBM bluemix (Error: TUNSETIFF failed: Inappropriate ioctl for device)
  • mount a host volume to a container created through Dockerfile
  • How to mount a directory in the docker container to the host?
  • Cross container communication with Docker
  • no nodes available to schedule pods - Running Kubernetes Locally with No VM
  • Using docker, puppet and jenkins for continuous delivery and PROD deployment [closed]
  • 2 Solutions collect form web for “How to create Docker image,Dockerfile of LAravel application from existing docker environment for Laravel”

    First of all, dockervel is not a single image. It consists of sevelar images orchestrated together by docker-compose (see docker-compose.yml). And the reason for that is that you don’t need all the parts every time (eg. you don’t load nodejs when all you want is to work with artisan). Also you can change parts (eg. you can change MySQL with Postgres).

    If you want to share your project, the easy way is to share the entire dockervel folder (please omit the node_modules folder, you can recreate it with dcomposer install, as also the database folders).

    If you realy want to make it a single dockerfile (not so good idea) you should combine each dockerfile into a single one and you will end up with a huge and not flexible container.

    This is NOT the answer to your question but I had bit of struggle with dockervel as well and thought of simplifying the docker implementation for Laravel projects.

    The result is https://github.com/purinda/docker-laravel

    This gives you ability to easily communicate with Laravel CLI commands such as artisan and running unit tests through phpunit in a the docker environment using multi-container environment.

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