Skip to content

Instantly share code, notes, and snippets.

@mborodov
Last active October 5, 2018 12:46
Show Gist options
  • Save mborodov/2b21c27993b3a2373e9f8ddae5d3e3b3 to your computer and use it in GitHub Desktop.
Save mborodov/2b21c27993b3a2373e9f8ddae5d3e3b3 to your computer and use it in GitHub Desktop.
Script for generate Router.php, Dockerfile and docker-compose.yml files for start WP container
#!/usr/bin/env bash
curl -O https://gist.githubusercontent.com/mborodov/fec94e11863b5f014a8e2a0ec48d28c9/raw/a36f7b9c0c5d6f506fd49e617549e727c21aa31b/router.php
cat > Dockerfile << EOF
FROM php:7.2
MAINTAINER Maksim Borodov
RUN docker-php-ext-install mbstring pdo pdo_mysql
EOF
cat > docker-compose.yml << EOF
version: '3.5'
services:
server:
build:
context: .
dockerfile: ./Dockerfile
image: wordpress-docker
command: php -S 0.0.0.0:80 -t /app /app/router.php
ports:
- "80:80"
volumes:
- .:/app
EOF
docker-compose up -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment