Skip to content

Instantly share code, notes, and snippets.

@devthue
Created August 19, 2016 03:02
Show Gist options
  • Save devthue/2f757eda8a5f011e8ab84702b22f6d85 to your computer and use it in GitHub Desktop.
Save devthue/2f757eda8a5f011e8ab84702b22f6d85 to your computer and use it in GitHub Desktop.
LEMP + RabbitMQ + Redis server (Ubuntu 14.04)

Pull Images

docker pull dinhbang/lemp

Create container from images dinhbang/lemp

docker run --privileged -p 80:80 -p 3306:3306 -p 6379:6379 -p 5672:5672 -p 15672:15672 --name ubuntu -v /Users/mac/Documents/Working/Php:/home/php -v /Users/mac/Documents/Working/Docker/Ubuntu/conf.d:/etc/nginx/conf.d -d dinhbang/lemp /sbin/init

Start container

Mysql account:

  • Username: root
  • Password: root

RabbitMQ account:

  • Username: test
  • Password: test
docker start ubuntu
docker exec -it ubuntu bash

Start service

Nginx (80), Php5-fpm, RabbitMQ (5672, 15672), Redis Server(6379), Mysql (3306)

cd / && ./start.sh

Commit container

docker commit -m "Nginx + Php5-fpm + Mysql + PhpRedis" -a "Dinh Nhat Bang" a7f874cd3a79 dinhbang/lemp

Push images to Hub

docker login --username=yourhubusername --email=youremail@company.com
docker push dinhbang/lemp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment