Creating docker image out of a production environment possible?

I know it’s very common to create Docker containers/images locally upfront of a project and deploy them to a certain environment (DEV/QA/PROD) once you have made changes. But what if you have a project already in production and you want to make local development possible/easier?

  1. General design question

  2. Elastic Beanstalk docker error
  3. tf-random won't install in Docker container
  4. Contents in the container's bind-mounted dir keep unchanged after mounting/umounting removable drive from the host
  5. copying files using cp in dockfile fails
  6. How am I supposed to use a Postgresql docker image/container?
  7. Use certificates in Docker container of Jenkins
  8. Is there any (clever) way to clone an environment into Docker containers/images that are reusable on development machines? What would be the best way to do that? If that’s not a good practice, how do you reproduce your prod environment on localhost?

  9. Example question

    I have a running production server with Drupal running on Apache on Debian with loads of plugins and extensions (for PHP, for PHP5 particularly, for Drupal, for Debian, ImageMagick, etc.)
    Shall I create a single image with Apache inside Debian and Drupal on top? How can I achieve this in a single Dockerfile/docker-compose.yml?

  • PhpMyadmin on Docker/MySQL on host
  • Could not locate Gemfile error by docker compose up
  • How can I identify why my replica's are not starting in the swarm?
  • Using a buildroot distro as a docker *host*
  • How can I mount a volume among remote Docker Machines?
  • Docker push on OS/X very slow - and seems to push layers that have already been pushed
  • One Solution collect form web for “Creating docker image out of a production environment possible?”

    1.Yes, there is a way to create docker images from production, but I’m afraid it’s manual, and involve little understanding of Drupal and docker..

    Docker4drupal is good starting point to make your docker-compose file

    2.Most of the times it’s wise to ceate multiple images and use them in one docker-compose file

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