{"id":11274,"date":"2020-03-16T06:00:22","date_gmt":"2020-03-16T10:00:22","guid":{"rendered":"https:\/\/blog.litespeedtech.com\/?p=11274"},"modified":"2020-03-16T06:00:22","modified_gmt":"2020-03-16T10:00:22","slug":"litespeed-offers-docker-solutions","status":"publish","type":"post","link":"https:\/\/lswp.store\/index.php\/2020\/03\/16\/litespeed-offers-docker-solutions\/","title":{"rendered":"LiteSpeed Offers Docker Solutions"},"content":{"rendered":"<p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-11282\" src=\"https:\/\/lswp.store\/wp-content\/uploads\/2020\/03\/Docker.jpg\" alt=\"LiteSpeed Docker\" width=\"1000\" height=\"500\" srcset=\"https:\/\/lswp.store\/wp-content\/uploads\/2020\/03\/Docker.jpg 1000w, https:\/\/lswp.store\/wp-content\/uploads\/2020\/03\/Docker-300x150.jpg 300w, https:\/\/lswp.store\/wp-content\/uploads\/2020\/03\/Docker-768x384.jpg 768w, https:\/\/lswp.store\/wp-content\/uploads\/2020\/03\/Docker-600x300.jpg 600w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<h2>OVERVIEW<\/h2>\n<p>Docker is more popular than ever these days, and this year LiteSpeed Technologies has introduced Docker images for both LiteSpeed Enterprise and OpenLiteSpeed web servers. Additionally, we&#8217;ve made WordPress app bundles available in GitHub repos for each server image, along with a Magento app bundle for our Enterprise image. With LiteSpeed Docker solutions, you can easily set up High Performance WordPress or Magento with HTTP\/3 protocol support, and developers can run on multiple platforms like Linux or Windows.<\/p>\n<h2>Available Images<\/h2>\n<p>We have made LiteSpeed Enterprise and OpenLiteSpeed Images available on <a href=\"https:\/\/hub.docker.com\/search?q=litespeedtech&amp;type=image\">Docker Hub<\/a>.<\/p>\n<figure id=\"attachment_11284\" aria-describedby=\"caption-attachment-11284\" style=\"width: 160px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/hub.docker.com\/r\/litespeedtech\/litespeed\"><img decoding=\"async\" class=\"wp-image-11284 size-full\" src=\"https:\/\/lswp.store\/wp-content\/uploads\/2020\/03\/dockerLSWS.png\" alt=\"LiteSpeed Enterprise\" width=\"160\" height=\"160\" srcset=\"https:\/\/lswp.store\/wp-content\/uploads\/2020\/03\/dockerLSWS.png 160w, https:\/\/lswp.store\/wp-content\/uploads\/2020\/03\/dockerLSWS-150x150.png 150w, https:\/\/lswp.store\/wp-content\/uploads\/2020\/03\/dockerLSWS-100x100.png 100w\" sizes=\"(max-width: 160px) 100vw, 160px\" \/><\/a><figcaption id=\"caption-attachment-11284\" class=\"wp-caption-text\">LiteSpeed Enterprise<\/figcaption><\/figure>\n<figure id=\"attachment_11286\" aria-describedby=\"caption-attachment-11286\" style=\"width: 160px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/hub.docker.com\/r\/litespeedtech\/openlitespeed\"><img decoding=\"async\" class=\"wp-image-11286 size-full\" src=\"https:\/\/lswp.store\/wp-content\/uploads\/2020\/03\/dockerOLS.png\" alt=\"OpenLiteSpeed\" width=\"160\" height=\"160\" srcset=\"https:\/\/lswp.store\/wp-content\/uploads\/2020\/03\/dockerOLS.png 160w, https:\/\/lswp.store\/wp-content\/uploads\/2020\/03\/dockerOLS-150x150.png 150w, https:\/\/lswp.store\/wp-content\/uploads\/2020\/03\/dockerOLS-100x100.png 100w\" sizes=\"(max-width: 160px) 100vw, 160px\" \/><\/a><figcaption id=\"caption-attachment-11286\" class=\"wp-caption-text\">OpenLiteSpeed<\/figcaption><\/figure>\n<h2>Deploy LiteSpeed<\/h2>\n<p>You can deploy either of the LiteSpeed images on Docker in less than a minute.<br \/>\nHere we\u2019ll use OpenLiteSpeed as an example, and assume you already have <a href=\"https:\/\/docs.docker.com\/install\/\">Docker installed<\/a>.<\/p>\n<h3>Download the Image from Docker Hub<\/h3>\n<pre>docker pull litespeedtech\/openlitespeed:latest<\/pre>\n<h3>Start a Container<\/h3>\n<pre>docker run -d --name openlitespeed -p 7080:7080 -p 80:80 -p 443:443 -it litespeedtech\/openlitespeed:latest<\/pre>\n<p>TIP: You can eliminate <code>-p 7080:7080<\/code> from the command if you don\u2019t need WebAdmin access.<\/p>\n<h3>Add a sample page<\/h3>\n<p>The server should start running successfully, and you should be able to log into the container. Add some files you want to display with the following command:<\/p>\n<pre>docker exec -it openlitespeed bash<\/pre>\n<p>Your default <code>WORKDIR<\/code> should be <code>\/var\/www\/vhosts\/<\/code>, since the default document root path is <code>\/var\/www\/vhosts\/localhost\/html<\/code>. Simply add the following command to <code>index.php<\/code>, and then verify it from the browser with a public server IP address on both HTTP and HTTPS:<\/p>\n<pre>echo '&lt;?php phpinfo();' &gt; localhost\/html\/index.php<\/pre>\n<h2>Deploy High-Performance WordPress with LiteSpeed<\/h2>\n<p>To start a high-performance WordPress-with-LiteSpeed-Cache solution, you can choose to use one of the following containers:<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/litespeedtech\/lsws-docker-env\">WordPress + LiteSpeed Enterprise<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/litespeedtech\/ols-docker-env\">WordPress + OpenLiteSpeed<\/a><\/li>\n<\/ul>\n<p>We\u2019ll use WordPress + OpenLiteSpeed as an example, and assume you already have <a href=\"https:\/\/docs.docker.com\/install\/\">Docker<\/a> and <a href=\"https:\/\/docs.docker.com\/compose\/install\/\">Docker Compose<\/a> installed.<\/p>\n<h3>Download the Open Source from GitHub<\/h3>\n<p>Clone this repository or copy the files from this repository into a new folder:<\/p>\n<pre>git clone https:\/\/github.com\/litespeedtech\/ols-docker-env.git<\/pre>\n<h3>Change the Default Values (Optional)<\/h3>\n<p>Edit the <code>.env<\/code> file to update the demo site domain, default MySQL user, and password. Feel free to check the <a href=\"https:\/\/hub.docker.com\/repository\/docker\/litespeedtech\/openlitespeed\/tags\">Docker Hub Tag page<\/a> if you want to update the default LiteSpeed Enterprise, OpenLiteSpeed, or PHP versions.<\/p>\n<h3>Start the Multicontainer<\/h3>\n<p>Open a terminal, <code>cd<\/code> to the folder in which <code>docker-compose.yml<\/code> is saved, and run:<\/p>\n<pre>docker-compose up -d<\/pre>\n<h3>Start Your First WordPress site<\/h3>\n<p>After running the following command, you should be able to access the WordPress installation page with the configured domain. If there is no change in the <code>.env<\/code> file, then the default domain is <code>https:\/\/localhost<\/code>.<\/p>\n<pre>bash bin\/demosite.sh<\/pre>\n<p>For more CLI usage information please check <a href=\"https:\/\/docs.litespeedtech.com\/docker\/ols+wordpress\/#usage\">our documentation<\/a> which covers:<\/p>\n<ul>\n<li>Setting the WebAdmin Password<\/li>\n<li>Creating a Domain and Virtual Host<\/li>\n<li>Creating a Database<\/li>\n<li>Installing a WordPress Site<\/li>\n<li>Applying a Let&#8217;s Encrypt Certificate<\/li>\n<li>Updating the Web Server<\/li>\n<li>Applying OWASP ModSecurity<\/li>\n<\/ul>\n<h2>Deploy High-Performance Magento with LiteMage<\/h2>\n<p>To start a high-performance Magento-with-LiteMage-Cache solution, you can use the following container:<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/litespeedtech\/lsws-magento-docker-env\">Magento + LiteSpeed Enterprise<\/a><\/li>\n<\/ul>\n<p>We&#8217;ll assume you already have <a href=\"https:\/\/docs.docker.com\/install\/\">Docker<\/a> and <a href=\"https:\/\/docs.docker.com\/compose\/install\/\">Docker Compose<\/a> installed.<br \/>\nAs of version 2.4, Magento requires Elasticsearch to be the catalog search engine, we recommend you have 4GB RAM on the server. If you are using a system with less than 4GB, we recommend you create a swap file, otherwise your upgrade might fail.<\/p>\n<h3>Download the Open Source from GitHub<\/h3>\n<p>Clone this repository or copy the files from this repository into a new folder:<\/p>\n<pre>git clone https:\/\/github.com\/litespeedtech\/lsws-magento-docker-env.git<\/pre>\n<h3>Change the Default Values (Optional)<\/h3>\n<p>Edit the <code>.env<\/code> file to update the demo site domain, default MySQL user, and password. Feel free to check the <a href=\"https:\/\/hub.docker.com\/repository\/docker\/litespeedtech\/litespeed\/tags\">Docker Hub Tag page<\/a> if you want to update the default LiteSpeed Enterprise, or PHP versions.<\/p>\n<h3>Start the Multicontainer<\/h3>\n<p>Open a terminal, <code>cd<\/code> to the folder in which <code>docker-compose.yml<\/code> is saved, and run:<\/p>\n<pre>docker-compose up -d<\/pre>\n<h3>Start Your First Magento site<\/h3>\n<p>After running the following command, you should be able to access the Magento page with the configured domain. If there is no change in the <code>.env<\/code> file, then the default domain is <code>https:\/\/localhost<\/code>.<\/p>\n<pre>bash bin\/demosite.sh<\/pre>\n<p>If you want to see Magento with sample data, simply add [<code>-S<\/code>, <code>--sample<\/code>] to apply:<\/p>\n<pre>bash bin\/demosite.sh -S<\/pre>\n<h2>Videos<\/h2>\n<ul>\n<li><a href=\" https:\/\/youtu.be\/S16spQxajas\">OpenLiteSpeed Docker One-Click Installation Part 1\/2<\/a><\/li>\n<li><a href=\"https:\/\/youtu.be\/4NaDkcNJCnc\">OpenLiteSpeed Docker One-Click Installation Part 2\/2<\/a><\/li>\n<\/ul>\n<h2>Customization<\/h2>\n<h3>Build Your Own Web Server Version<\/h3>\n<p>Sometimes you may want to install more packages from the default image, or some other web server or PHP version which is not officially provided. You can build an image based on an existing image. Here\u2019s how:<\/p>\n<ol>\n<li>Download the dockerfile project<\/li>\n<li>CD into the project directory<\/li>\n<li>Edit the Dockerfile if necessary<\/li>\n<li>Build, feeling free to substitute server and PHP versions to fit your needs<\/li>\n<\/ol>\n<p>For example:<\/p>\n<pre>git clone https:\/\/github.com\/litespeedtech\/lsws-dockerfiles.git\ncd lsws-dockerfiles\/template\nbash build.sh -L 5.4.9 -P lsphp74\n<\/pre>\n<p>or<\/p>\n<pre>git clone https:\/\/github.com\/litespeedtech\/ols-dockerfiles.git\ncd ols-dockerfiles\/template\nbash build.sh -O 1.6.15 -P lsphp74\n<\/pre>\n<h3>Extend Existing Images<\/h3>\n<p>If you want to customize the image by adding some packages, e.g. <code>lsphp74-pspell<\/code>, just extend it with a Dockerfile:<\/p>\n<pre>FROM litespeedtech\/openlitespeed:latest\nRUN apt-get update &amp;&amp; apt-get install lsphp74-pspell -y\n<\/pre>\n<h2>Conclusions<\/h2>\n<p>LiteSpeed Docker solutions allow you to start a pure LSWS or OLS web server on Docker, or start WP + LiteSpeed \/ Magento + LiteSpeed Docker solutions easily. You can also customize or extend the image whenever you need to. Our Docker solutions are still in a very early release stage, so feel free to raise an issue if you have any suggestions or problems. Contributions are always welcome.<\/p>\n<p>Special thanks to our friend Lars Hagen. Lars is a DevOps enthusiast, with a passion for Docker and everything in the cloud. He helped us lay out the foundation for building good, robust Docker images, which is why we now have these high-end Docker images to support and use today.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>LiteSpeed Technologies has introduced Docker images for both LiteSpeed Enterprise and OpenLiteSpeed web servers, as well as a WordPress App bundle.<\/p>\n","protected":false},"author":1,"featured_media":11282,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[17],"tags":[61,93,316],"class_list":["post-11274","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-company-news","tag-cloud","tag-docker","tag-wordpress"],"jetpack_featured_media_url":"https:\/\/lswp.store\/wp-content\/uploads\/2020\/03\/Docker.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/posts\/11274","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/comments?post=11274"}],"version-history":[{"count":0,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/posts\/11274\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/media\/11282"}],"wp:attachment":[{"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/media?parent=11274"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/categories?post=11274"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/tags?post=11274"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}