Posted On March 31, 2019

LAMP Stack using Docker

kimconnect 0 comments
blog.KimConnect.com >> Codes , Virtualization >> LAMP Stack using Docker
# Install docker and compose
yum install docker docker-compose -y

# Add user into docker group
usermod -aG docker kimconnect

# Create test file and directory
mkdir -p /var/www/dockerized-lamp/
echo "<?php phpinfo(); ?>" > /var/www/dockerized-lamp/index.php

# Create yaml file
vim /var/www/dockerized-lamp/docker-compose.yml

# Content of yaml file
version: '3'
services:
php-apache:
image: php:7.2-cli
ports:
- 8081:80
volumes:
- ./:/var/www/html
links:
- 'mysql-server'

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

How to Import Files Into a Docker Container

1. Use SCP to copy files to the remote server while logged onto the local…

PowerShell: Find Hyper-V Host by Guest VM Name

# findVmHostByGuestName.ps1 $vmName='TESTVM' function findVmHostByGuestName($vmName){ try{ Import-Module Hyper-V Import-Module FailoverClusters $allHyperVHosts={(Get-ClusterNode | Where { $_.State…

Basic CSS: Override Styles in Subsequent CSS

<style>body {background-color: black;font-family: monospace;color: green;}.pink-text {color: pink;}</style><h1 class="pink-text">Hello World!</h1>