GithubHelp home page GithubHelp logo

dockerfile-xampp's Introduction

XAMPP Dockerfile

This is a Dockerfile to build XAMPP based on ubuntu:16.04, and you can also find it on Docker Hub .

Build Image From Dockerfile

First, using command git clone to clone this project.

$ git clone https://github.com/fuyuanli/Dockerfile-XAMPP.git

Second, buildng XAMPP image form Dockerfile, you can use tag -t to name this image.

$ docker build -t fuyuanli/xampp .

Useage

Setup 1 : Pull this image from Docker Hub.

$ docker pull fuyuanli/xampp

or building this image from Dockerfile .

$ docker docker build -t fuyuanli/xampp .  

Setup 2 : Now you have a xampp image,and using command docker run to run , and use tag -v to mount on your folder, tag -p can forward the port 80 (HTTP) , 443 (HTTPS) , and 3306 (MariaDB/MySQL) .

The path /opt/lampp/htdocs is the web root directory , mount it so you can edit your website easily.

$ docker run -d -v /to/your/path:/opt/lampp/htdocs -p 80:80 -p 443:443 -p 3306:3306 fuyuanli/xampp

The path /opt/lampp/htdocs is the web root directory , mount it, let you edit the website easily.

Access Your Contaier

Usig the command docker exec -it fuyuanli/xampp bash to run bash in the live container, and you can use command mysql, php... without cd /opt/lampp/bin , the path has been added in /root/.bashrc.

如果你看的懂中文的話,那就看英文吧。懶得再打了XDDD。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.