Code Monkey home page Code Monkey logo

ols-dockerfiles's Introduction

OpenLiteSpeed Docker Container

Build Status docker pulls

Install a lightweight OpenLiteSpeed container using either the Edge or Stable version in Ubuntu 22.04 Linux.

Prerequisites

Build Components

The system will regulary build both OpenLiteSpeed Edge and Latest stable versions, along with the last two PHP versions.

Component Version
Linux Ubuntu 22.04
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 litespeedtech/openlitespeed:latest

or specify the OpenLiteSpeed version with lsphp version

docker pull litespeedtech/openlitespeed:1.7.16-lsphp81

Start a Container

docker run --name openlitespeed -p 7080:7080 -p 80:80 -p 443:443 -it litespeedtech/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 litespeedtech/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

Customization

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’s how:

  1. Download the dockerfile project
  2. cd into the project directory
  3. Edit the Dockerfile here if necessary
  4. Build, feeling free to substitute server and PHP versions to fit your needs

For example,

git clone https://github.com/litespeedtech/ols-dockerfiles.git
cd ols-dockerfiles/template
bash build.sh -O 1.7.16 -P lsphp81

Support & Feedback

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

Pull requests are always welcome

ols-dockerfiles's People

Contributors

code-egg avatar ducun avatar lars-hagen avatar qmorek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ols-dockerfiles's Issues

How to add/use lsphp81-dev

Hi,

how can I use lsphp81-dev instead of lsphp81.

I tried to get it with this Dockerfile commands:

RUN wget https://rpms.litespeedtech.com/debian/enable_lst_debian_repo.sh
# COPY enable_lst_debian_repo.sh ./enable_lst_debian_repo.sh
RUN bash enable_lst_debian_repo.sh

RUN apt install -y lsphp80-dev

But i get the error

wget http://rpms.litespeedtech.com/debian/enable_lst_debian_repo.sh
--2023-01-24 12:09:00--  http://rpms.litespeedtech.com/debian/enable_lst_debian_repo.sh
Resolving rpms.litespeedtech.com (rpms.litespeedtech.com)... ::ffff:52.55.120.73, 52.55.120.73
Connecting to rpms.litespeedtech.com (rpms.litespeedtech.com)|::ffff:52.55.120.73|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2023-01-24 12:09:00 ERROR 404: Not Found.

But I can access the http://rpms.litespeedtech.com/debian/enable_lst_debian_repo.sh from my host os (also ubuntu) without any problem. So why does it not work inside the docker container?

Docker Hub update

The last release to docker hub is 1.6.18, can we get the two updates since then published as well?

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.