Lemuntu

[Play Docker]How to build up an apache server in docker

2 627
Edited by john.wen at Jul 21, 2016 02:12

How to build up an apache server in docker


1. Introduction

The Apache HTTP Server Project is an effort to develop and maintain an open-source HTTP server for modern operating systems including UNIX and Windows. The goal of this project is to provide a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards.


2. Install Docker

Please refer 《How to install docker on the Lemuntu》 to learn how to install docker. In this article, we will teach you how to install docker on Lemuntu.


3. Install apache server

(1) Search ubuntu docker image
  1. docker search armhf
Copy the Code


(2) Download ubuntu docker image
  1. docker pull armv7/armhf-ubuntu
Copy the Code


(3) Run ubuntu docker image
  1. sudo docker run -t -i -p 80:80 armv7/armhf-ubuntu /bin/bash
Copy the Code
-p 80:80 represents that apache server's 80 port is mapped to the host's 80 port.



(4) Install apache
  1. apt-get update
  2. apt-get install apache2
Copy the Code

(5) Start apache

  1. sudo apache2ctl -k start
Copy the Code
We can use netstat command to view servers and ports.




4. Open Web page
(1) Open apache's default page
We can use Iceweasel web browser to open apache's default page
Note that 192.168.0.63 is LeMaker Guitar's IP address.



We also can use google chrome webbrowser to open apache'default page



(2) Create a web page
A easy example is bellow:
  1. <html>
  2. <head>
  3. <tittle>Docker Apache Server on LeMaker Guitar<br /></tittle>
  4. </head>

  5. <br />
  6. <br />
  7. <br />

  8. <body>
  9. This is a test web page on docker.
  10. </body>
  11. </html>
Copy the Code
Save the file to /var/www/html/index.html

We will see as bellow:








It was good you mention that how to "Commit" and save the Docker Image after installing the applications.

Note for readers: Docker needs to be "Committed" and "Saved" into New Local/Remote Image to keep your modifications.
Otherwise, next time you back into Docker, all installation has gone ...




abc20180506
tory burch outlet
ugg outlet
ugg boots
louboutin shoes
coach outlet
burberry outlet
jordan shoes
harden vol 1
coach outlet
ralph lauren outlet
north face jackets
polo ralph lauren outlet
coach outlet
oakey sunglasses
ecco shoes for men
tiffany and co
coach outlet
polo ralph lauren outlet online
jordan shoes
louboutin shoes
adidas yeezy boost
louis vuitton outlet store
replica watches
air max 2018
timberland boots
coach factory outlet
michael kors outlet
cheap ray ban sunglasses
hermes handbags
nike air max
cheap oakley sunglasses
canada goose outlet
nike outlet online
cheap oakley sunglasses
polo outlet store
michael kors
canada goose jackets
moncler outlet
kate spade outlet
nfl jerseys wholesale
kate spade handbag
nike shoes
nike air max
jordan retro
pandora charms
yeezy boost
timberland boots
adidas
michael kors outlet online
vans shoes
michael kors outlet clearance
michael kors outlet
christian louboutin outlet
supreme new york
fitflops
michael kors handbags
canada goose uk
ugg outlet
coach factorty outlet
ray ban sunglasses
adidas yeezy
north face jackets
cheap oakley sunglasses
christian louboutin
canada goose jackets
coach outlet
ralph lauren outlet
pandora jewelry
nike shoes
fred perry polo
nba jerseys
fitflops sale clearance
hermens bags
ecco shoes
burberry outlet
canada goose uk
tiffany outlet
toms outlet
hollister clothing
mbt
supra shoes
birkenstocks
mcm handbags
burberry outlet store
ugg boots
pandora outlet
cheap jordans
canada goose sale
longchamp outlet online
michael kors outlet online
nike outlet
coach factory outlet
air jordans
pandora charms
pandora charms sale clearance
pandora charms
coach outlet store
polo ralph lauren outlet
coach outlet
pandora charms
coach outlet
moncler jackets
coach factory outlet
oakley sunglasses outlet
michael kors outlet
ralph lauren sale clearance
coach outlet online
ugg boots
coach outlet store
nike outlet
cheap mlb jerseys china
toms outlet
coach factory outlet
cheap mlb jerseys
pandora jewelry
pandora charms sale
adidas shoes
adidas yeezy boost
coach outlet
michael kors outlet
cheap nfl jerseys
nike air max outlet
fitflops sale
red bottoms shoes
birkenstock shoes
yeezy boost
hermes handbags
red bottom shoes
ralph lauren sale clearance
abc20180506

You have to log in before you can reply Login | Sign Up

Points Rules