Tag Archives: best and cheap docker hosting

ByAlexia Pamelov

Joomla Hosting with Docker and Memcached

CheapWindowsHosting.com | In this post I’ll show you how you can quickly and easily setup a fast Joomla! site running in Docker, and using Memcached for caching. We’ll also be using Docker Compose to make managing the relationships between containers easier. Docker Compose makes the task of managing multiple Docker containers much easier than doing them individually. It also makes it easier if you want to develop this site on your local environment and later push it to a remote server with docker — although that’s a topic for another tutorial.

docker

Install Docker and Docker Compose

If you haven’t installed Docker on your machine yet, follow these instructions.  The instructions for Ubuntu 14.04 (LTS) are below. Be sure to run them as root! If you already have Docker skip on to installing Docker Compose if you don’t already have it.

Install Docker on Ubuntu 14.04 LTS
apt-get update
apt-get install apt-transport-https ca-certificates
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" >> /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install linux-image-extra-$(uname -r) apparmor docker-engine
service docker start

 Next install docker compose:

curl -L https://github.com/docker/compose/releases/download/1.6.2/docker-compose-`uname -s`-`uname -m` >> /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
docker-compose -v

You should see docker-compose output its version information. Something like: docker-compose version 1.6.2, build 4d72027.

Prepare Joomla and Docker files

Next up we need to create the docker compose files and get the Joomla files ready to use:

Create Project Directory

mkdir -p ./mysite/website_source ./mysite/mysql
cd mysite

Create a Dockerfile

Next create a Dockerfile (e.g. vim Dockerfile) that tells Docker to base your webserver code off of a PHP5 image, and include your source code.

Dockerfile
FROM php:5-fpm
 
# Install dependencies
RUN apt-get update -y && apt-get install -y php5-json php5-xmlrpc libxml2-dev php5-common zlib1g-dev libmemcached-dev
 
# Install mysqli extension
RUN docker-php-ext-install mysqli
 
# Install memcache extension
RUN pecl install memcache && docker-php-ext-enable memcache
 
# Add sources to image
ADD ./website_source /site

Create the Docker Compose config file

And then create the docker-compose.yml file (e.g. vim docker-compose.yml). The docker-compose file lays out how your website is structured. It says that your site is composed of three services: web which is an Apache/PHP image with your source code baked in, db which is the MySQL database, and cache which is the memcached image. It also tells docker how to connect these docker containers so that they can communicate with each other. Lastly, it tells docker to bind port 80 to the web container. Lastly, the mysql container will mount the mysql directory on the host and place the database files there. This way if the container is removed or anything you don’t lose your database.

docker-compose.yml
version: '2'
services:
  web:
    build: .
    command: php -S 0.0.0.0:80 -t /site
    ports:
      - "80:80"
    depends_on:
      - db
      - cache
    volumes:
      - ./website_source:/site
  db:
    image: orchardup/mysql
    environment:
      MYSQL_DATABASE: joomla
      MYSQL_ROOT_PASSWORD: my_secret_pass
    volumes:
      - ./mysql:/var/lib/mysql
  cache:
    image: memcached

 

By sure to replace my_secret_pass with a secure password for the mysql user!

Get Joomla! Sources

Now that you have a Dockerfile and docker-compose.yml you just need to get the sources for Joomla and install them:

Download and Install Joomla!

wget https://github.com/joomla/joomla-cms/releases/download/3.4.8/Joomla_3.4.8-Stable-Full_Package.zip
unzip Joomla*.zip -d ./website_source
mv ./website_source/htaccess.txt ./website_source/.htaccess
mv ./website_source/robots.txt.dist ./website_source/robots.txt

Note that if you don’t have unzip installed you can install it by running apt-get install unzip.

Build and Run Docker Containers

Now that you have everything setup its time to test everything by building and running the docker containers. This is accomplished with docker-compose:

docker-compose build
docker-compose up

 This will run the whole application in the foreground of your terminal. Go to http://localhost:80 and complete the Joomla Installer! You’ll use the mysql username and password you specified in your docker-compose.yml file. The mysql host is also specified in the docker-compose.yml file as the name of the database service. In our case, this is db. Once you’re finished you can use CTRL+C to stop the containers.

Configuring Joomla for Memcached

Now that your Joomla site is running under docker it’s time to connect it to the memcached server to make sure that things stay speedy!

To enable memcached edit

website_sources/configuration.php and replace

public $caching = '0';
public $cache_handler = 'file';

 with this

public $caching = '2';
public $cache_handler = 'memcache';
public $memcache_server_host = 'cache';
public $memcache_server_port = '11211'

 Add your changes to the container image with docker-compose build and then run docker-compose up, log into the Joomla administration page and go to “Global Configuration” -> “System”. You can tweak the settings under “Cache Settings” or leave them as they are.

Running on Server Start

The last step in setting up a web application with docker is to have the web server started when the server starts.

Create the file /etc/init/mydockersite.conf with the contents:

/etc/init/mydockersite.conf
  
description "Website Docker Compose"
author "MichaelBlouin"
start on filesystem and started docker
stop on runlevel [!2345]
respawn
script
  /usr/local/bin/docker-compose -f /var/www/mysite/docker-compose.yml up
end script

Be sure to replace /var/www/mysite/docker-compose.yml with the full path to your docker-compose.yml!

Save the file and run the following to register the service, and to start it:

initctl reload-configuration
service mydockersite start

 And there you go! You can view logs for your service by running docker-compose logs while in the same directory as your docker-compose.yml or by reading the logfile at /var/log/upstart/mydockersite.log.

ByAlexia Pamelov

Cheap Docker Hosting Recommendation

CheapWindowsHosting.com | Best and cheap Docker hosting. Docker’s commercial solutions provide an out of the box CaaS environment that gives IT Ops teams security and control over their environment, while enabling developers to build applications in a self service way. With a clear separation of concerns and robust tooling, organizations are able to innovate faster, reduce costs and ensure security.

docker_survey_3_v2-3-01

Docker containers wrap a piece of software in a complete filesystem that contains everything needed to run: code, runtime, system tools, system libraries – anything that can be installed on a server. This guarantees that the software will always run the same, regardless of its environment.

  • LIGHTWEIGHT

    Containers running on a single machine share the same operating system kernel; they start instantly and use less RAM. Images are constructed from layered filesystems and share common files, making disk usage and image downloads much more efficient.

  • OPEN

    Docker containers are based on open standards, enabling containers to run on all major Linux distributions and on Microsoft Windows — and on top of any infrastructure.

  • SECURE BY DEFAULT

    Containers isolate applications from one another and the underlying infrastructure, while providing an added layer of protection for the application.


     

Cheap Docker Hosting Recommendation

ASPHostPortal - Best Docker Hosting

asphostportal-icon-e1421832425840-120x120-e1424663413602Founded in 2008, it is a fast growing web hosting company operated in New York, NY, US, offering the comprehensive web hosting solutions on Windows Hosting and they have a brilliant reputation in the Node.js development community for their budget and developer-friendly hosting which supports almost all the latest cutting-edge Microsoft technology. ASPHostPortal have various shared hosting plan which start from Host Intro until Host Seven. But, there are only 4 favorite plans which start from Host One, Host Two, Host Three, and Host Four. Host One plan start with $5.00/month. Host Two start with $9.00/month, Host Three is the most favorite plan start from $14.00/month and Host Four start with $23.00/month. All of their hosting plan allows user host unlimited domains, unlimited email accounts, at least 1 MSSQL and 1 MySQL database. ASPHostPortal is the best Node.js Hosting, check further information at http://www.asphostportal.com

HostForLIFE - A Superior Docker Hosting Provider

hostforlife-icon-e1421832276583-120x120-e1424663388212HostForLIFE, specializing in offering affordable and manageable Docker hosting services, releases three plans for the clients – Classic Plan, Budget Plan, Economy Plan and Business Plan regularly starting at €3.00/mo, €5.50/mo, €8.00/mo and €11.00/mo separately. And also, the 30-day money back guarantee is offered to the clients who wish to cancel their accounts and get a refund. HostForLIFE supports Windows 2012/2008, ASP.NET 2.0/3.5SP1/4.0/4.5.1/5 as well as IIS8.5/ IIS8. It offers various versions of Microsoft SQL Databases, including MS SQL 2014, MS SQL 2012, MS SQL 2012R2 and MS SQL 2008. Each database comes with at least 500MB disk space. Furthermore, the webmasters can install the software by using one-click app installer. Besides, it is worth mentioning that the webmasters can get a full control of their websites through the users-friendly ASP.NET control panel of HostForLIFE. By using the top-level data center HostForLIFE delivers average 99.99% uptime to each hosted website.

DiscountService.biz –Premium Docker Hosting Service Provider

discountservice-icon-e1421396726386-120x120-e1424663401956DiscountService.biz is Microsoft Gold Partner, which means they are the first one to know the latest Microsoft technology and test Microsoft product before being released to the public. The engineers from DiscountService fully understand the needs of Microsoft developer, when signing up their service, their customer could choose the version of platform to better support their application. IIS ASP.NET MVC security from DiscountService is also at FULL Trust level. The price of DiscountService is at $7.00/month.

Summary

Under the overall consideration, ASPHostPortal, HostForLIFE and DiscountService.biz are 3 first-rank cheap Docker hosting providers because of their affordable price, rich features, excellent performance and reliable support. Another piece of good news is that they have been listed as the cheap Docker Hosting companies 2016

ByAlexia Pamelov

Introduction About Docker

CheapWindowsHosting.com | Best and cheap docker hosting. In this post we will explains everything about docker.

What is Docker?

Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package. By doing so, thanks to the container, the developer can rest assured that the application will run on any other Linux machine regardless of any customized settings that machine might have that could differ from the machine used for writing and testing the code.

docker

In a way, Docker is a bit like a virtual machine. But unlike a virtual machine, rather than creating a whole virtual operating system, Docker allows applications to use the same Linux kernel as the system that they’re running on and only requires applications be shipped with things not already running on the host computer. This gives a significant performance boost and reduces the size of the application.

And importantly, Docker is open source. This means that anyone can contribute to Docker and extend it to meet their own needs if they need additional features that aren’t available out of the box.

Who is Docker for?

Docker is a tool that is designed to benefit both developers and system administrators, making it a part of many DevOps (developers + operations) toolchains. For developers, it means that they can focus on writing code without worrying about the system that it will ultimately be running on. It also allows them to get a head start by using one of thousands of programs already designed to run in a Docker container as a part of their application. For operations staff, Docker gives flexibility and potentially reduces the number of systems needed because of its small footprint and lower overhead.

Docker and security

Docker brings security to applications running in a shared environment, but containers by themselves are not an alternative to taking proper security measures.

Dan Walsh, a computer security leader best known for his work on SELinux, gives his perspective on the importance of making sure Docker containers are secure. He also provides a detailed breakdown of security features currently within Docker, and how they function.

The future of Docker

A number of companies and organizations are coming together to bring Docker to desktop applications, a feat that could have wide-ranging impacts on end-users. Microsoft is even jumping on board by bringing Docker to their Azure platform, a development that could potentially make integration of Linux applications with Microsoft products easier than ever before.

Docker 1.0 was released on June 9th, during the first day of Dockercon, and it is considered the first release of Docker stable enough for enterprise use. Along with this launch, a new partnership was announced between Docker and the companies behind libcontainer, creating a unified effort toward making libcontainers the default standard for Linux-based containers. The growth of Docker and Linux containers shows no sign of slowing, and with new businesses jumping on the bandwagon on a regular basis, I expect to see a wealth of new developments over the coming year.

Save