How to use Docker for a drupal development site and then deploy to online provider? I am operating a Drupal website with two installations:


a development site on my local machine (dev)
a live site at my ISP offering an Apache httpd, with PHP and MySQL (live)


For dev, so far I have just installed software on my local machine (httpd,  php, mysql, drupal) and deployed updates to live by copying changed PHP files and uploading a database backup.

I am considering to use Docker for my dev installation (e.g., docker4drupal). However, due to ISP limitations for the live site I will still have to deploy updates by uploading PHP files from the webserver and database images from MySQL/MariaDB.

What is the best way to extract PHP files and DB snapshots from a docker4drupal installation (or similar Docker based set-ups)?
You're asking 2 questions in the post: a general one (title) &amp; a platform specific one (body), which is off-topic here (we don't write tutorials for Drupal platform integration). I'll answer the general which is useful at-large.

Most of the docker-based Drupal dev tools have decent feature sets. Each tool has one-or-two features that make it uniquely standout for a particular use scenario. You have to judge a dev-tool on who's maintaining, why are doing it, what are its supported features/platforms, how long it's been in development.

Theoretically, everything being Dockerized means you build/test locally and can deploy anywhere that does Docker hosting. In practice, to get from point A to point B, you'll have to figure how what your host platform provides technically (e.g. IaaS vs PaaS, CI tools, etc.) to what you have for your dev setup is (e.g. Dockerized toolchains, source code host, etc.) and match it up to see if all the pieces fit.

You can decide provider or docker-based dev-tools first, but a choice of one is going to impact the other in some way. You basically have to go a through a matrix of:


What the Docker dev-tool provides
What features you want (for platform/dev-tools)
What the platform provides (for integration)


Then the "best" is whatever matches lines up most in your matrix (or tensor since we're talking 3 attributes here). There's a lot of details along the way. You have to do a lot research to fill in the details that work best work for your project.