Skip to content

Instantly share code, notes, and snippets.

@cosmadora
Last active November 17, 2021 21:32
Show Gist options
  • Select an option

  • Save cosmadora/6bcaeb25cb7eb1ea209d51f359ca0726 to your computer and use it in GitHub Desktop.

Select an option

Save cosmadora/6bcaeb25cb7eb1ea209d51f359ca0726 to your computer and use it in GitHub Desktop.
LAMP Docker Stack
version: '3.6'
services:
db:
image: mysql:latest
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ROOT_PASSWORD: password
# uncomment if you want to expose mysql db conenction
# ports:
# - 3306:3306
volumes:
- "./database:/var/lib/mysql"
db_pma:
image: phpmyadmin/phpmyadmin:latest
depends_on:
- db
ports:
- 8082:80
environment:
MYSQL_ROOT_PASSWORD: password
PMA_USER: root
PMA_PASSWORD: password
www:
depends_on:
- db
image: php:apache
volumes:
- "D:/Git/asdasdasdasdsad:/var/www/html"
command: sh -c "docker-php-ext-install mysqli && apache2-foreground"
ports:
- 8080:80
# Source: https://www.soupbowl.io/2020/03/replace-lamp-with-docker-the-easy-way/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment