Exploring Linux Terminal & Docker
Published by Curtis King
Introduction
I have recently been focusing on exploring the Linux part of LAMP stack development and along with that, containerisation through Docker.
This has been a great learning experience for me as part of developing a better understanding of Linux Bash terminal skills.
I decided to take this route as I wanted to understand how to manage and deploy applications in a more efficient way,
and also to explore the benefits of having portable applications which can be easily run on virtually any machine.
Having recently setup a LAMP stack on an old machine of mine which has been completely converted from running Windows to now running Ubuntu 24.04 (great choice you say, I know right! 😁),
I also needed to find a way to be able to develop on my Windows machine and deploy to my Ubuntu machine without any issues.
Linux Terminal Skills
-
File System Navigation:
cdfor directory navigationlsfor listing directory contentsmkdir/rmfor directory managementtouchfor file creation
-
File Operations:
vimfor text editingcp/mvfor file operationsfindfor locating files
-
Docker Environment Management:
- Creating and managing Dockerfiles
- Working with docker-compose.yml configurations
Docker Containerization Skills
-
Container Orchestration:
- Multi-service setup with Docker Compose
- Dependency management with
depends_on - Port mapping and network configuration
-
Image Management:
- Building custom images with
Dockerfile - Tagging and versioning images
- Utilizing official base images (e.g., MySQL, Ubuntu)
- Building custom images with
-
Development Workflow:
- Bind mounts for live code updates
- Persistent volumes for database storage
- Cross-platform development setup
Key Technical Achievements
- Successfully containerized LAMP stack components (Apache, MySQL, PHP)
- Implemented automated database initialization with SQL scripts
- Established seamless Windows/Linux development workflow using Docker
- Configured persistent storage for database integrity between sessions
- Mastered Docker networking for service communication