Key Knowledge
- These steps will be updated as new best practices emerge.
- Use Docker to provision the development stack inside containers. Containers are more scalable for deployment automation.
- Windows Subsystem for Linux (WSL) can be used to interface with an open source stack.
- MySQL is excluded. (LA
MP = LAP)
Clone the Repository
Setup Windows Subsystem for Linux (WSL) with Ubuntu
Follow the installation instructions.
WSL environment can be reset by uninstalling the Ubuntu App, restarting Windows, and reinstalling the Ubuntu App from Windows Store.
Setup Docker
Enable booting into UEFI firmware settings to edit BIOS.
Turn on virtualization in BIOS. This will vary based on vendor.
Enable listening on remote port without TLS.
Setup Docker in WSL
Normalize Volume Mount Paths
Sign out and sign back in, or restart the machine for the changes to take effect.
Install Docker Compose
Build the Web Server Docker Container
Build the Docker Composition
Enable overriding the default configuration using Docker Volumes.
Run the Docker Composition
Change the DNS Server Used by Docker Server
Works Cited
How to set up a PHP development environment on Windows Subsystem for Linux (WSL)
LAMP on WSL.
WSL is a compatibility layer for running Linux binary executables (in ELF format) natively on Windows 10. Microsoft says:
“This is primarily a tool for developers — especially web developers and those who work on or with open source projects”.
We can run a Linux environment directly on Windows without the overhead of a virtual machine.
Windows Subsystem for Linux Installation Guide for Windows 10
https://docs.microsoft.com/en-us/windows/wsl/install-win10
How to develop a LAMP web application using Docker, Puppet and Vagrant?
Use Docker to provision application stacks.
Partition dependencies into separate Docker images.
User Docker Volumes to externalize state.
Mirror production stack in development stack.
Get Docker CE for Ubuntu
https://docs.docker.com/install/linux/docker-ce/ubuntu/
Install Docker Desktop for Windows
https://docs.docker.com/docker-for-windows/install/
Install Docker Compose
https://docs.docker.com/compose/install/
How to set up Docker and Windows Subsystem for Linux: A Love Story.
Setting Up Docker for Windows and WSL to Work Flawlessly
https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly
LAMP stack built with Docker Compose
https://github.com/sprintcube/docker-compose-lamp/tree/7.2.x/bin
Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection
https://github.com/docker/for-win/issues/611
Prune unused Docker objects
https://docs.docker.com/config/pruning/
How to Access the BIOS on a Windows 10 PC
https://www.laptopmag.com/articles/access-bios-windows-10
Docker’s detached mode for beginners
https://medium.freecodecamp.org/dockers-detached-mode-for-beginners-c53095193ee9
Leave a comment
You must log in to post a comment.