Giter Site home page Giter Site logo

dockerizing's Introduction

dockerizing

En-docker your apache server in linux with configurable ssl support

###Prerequisites

Apache

Edit the Dockerfile

rename this mySite.com to your site domain (it's supposed to your SSL files are related to this domain name)

ENV APACHE_MY_CERT_NAME mySite.com

so for example must be

ENV APACHE_MY_CERT_NAME google.com

Also rename the mySite.com legend from the runIt files . Also would be good you set permission

  • chmod +x runIt
  • chmod +x etcFake/runIt

Then prepare the etcFake folder

You need to replace the files into the apache2/ssl only, with your own ssl certificates files so just replace mySite.com.crt, mySite.com.spachebundle.crt and mySite.com.key. (I'm using right now a great SSL certificate provided by https://github.com/coolaj86/nodejs-ssl-example/tree/master/certs thanks! @coolaj86)

Also consider changing permission on the ssl files

  • chmod 644 mySite.com.crt
  • chmod 644 mySite.com.apachebundle.crt
  • chmod 600 mySite.com.key

Dockerizing

Now from/since/inside the dockerizing folder do:

  • docker build .

(check the number like Successfully built 6160c269fa05)

  • docker tag 6160c269fa05 apache2:one
  • docker run -t -i --name apache2 -v /path/to/your/website:/var/www/ -v /path/to/the/dockerizing/etcFake:/root/ -p 80:80 -p 443:443 apache2:one

Boom ! You are done with your site enjoy!

great docker resources

www.kencochrane.net/blog/2013/08/the-docker-guidebook/#search

www.kimh.github.io/blog/en/docker/gotchas-in-writing-dockerfile-en/ https://app.lastbackend.com/signin#_

docker home page (www.docker.com)

Licensed by GPL v3

*Project created by Mario Ruiz *

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.