ndigitals / ols-dockerfiles

Unofficial build of OpenLiteSpeed, High Performance, HTTP/3 supported, ready to use on arm64.
MIT License
8 stars 2 forks source link
docker-image openlitespeed

OpenLiteSpeed Docker Container

release-build

Install a lightweight OpenLiteSpeed container using the Stable version in Debian 11 Linux on arm64.

Supported tags

Prerequisites

Build Components

The system will regulary build the OpenLiteSpeed Latest stable version, along with at least two PHP versions, currently only PHP 8.x.

Component Version
Linux Debian 11
OpenLiteSpeed Latest stable version
PHP Latest stable version

Usage

Download an image

Download the openlitespeed image, we can use latest for latest version

docker pull ghcr.io/ndigitals/openlitespeed:latest

or specify the OpenLiteSpeed version with lsphp version

docker pull ghcr.io/ndigitals/openlitespeed:1.7-lsphp82

Start a Container

docker run --name openlitespeed -p 7080:7080 -p 80:80 -p 443:443 -it ghcr.io/ndigitals/openlitespeed:latest

You can also run with Detached mode, like so:

docker run -d --name openlitespeed -p 7080:7080 -p 80:80 -p 443:443 -it ghcr.io/ndigitals/openlitespeed:latest

Tip, you can get rid of -p 7080:7080 from the command if you don’t need the web admin access.

Add a sample page

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:

docker exec -it openlitespeed bash

Your default WORKDIR should be /var/www/vhosts/, since the default document root path is /var/www/vhosts/localhost/html. Simply add the following command to index.php, then we can verify it from the browser with a public server IP address on both HTTP and HTTPS.

echo '<?php phpinfo();' > localhost/html/index.php

Stop a Container

Feel free to substitute the "openlitespeed" to the "Container_ID" if you did not define any name for the container.

docker stop openlitespeed

NodeJS Support

This image includes NodeJS in order to run NodeJS apps. Choose a tag that includes the version of NodeJS needed.

See official documentation for more details on running NodeJS under OpenLiteSpeed. https://openlitespeed.org/kb/running-node-js-apps-with-openlitespeed/

Support & Feedback

If you still have a question after using OpenLiteSpeed Docker, you have a few options.

Pull requests are always welcome