Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions openlitespeed/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ARG TARGETPLATFORM
# Install necessary packages
RUN apt-get update && apt-get install -y --no-install-recommends \
wget curl cron less tzdata gnupg2 ca-certificates procps libatomic1 \
msmtp git \
msmtp git mysql-client \
&& rm -rf /var/lib/apt/lists/*

# Download and install OpenLiteSpeed
Expand Down Expand Up @@ -48,8 +48,8 @@ RUN wget -qO /usr/local/bin/composer https://getcomposer.org/download/latest-sta
&& chmod +x /usr/local/bin/wp \
&& echo "alias wp='wp --allow-root'" >> /root/.bashrc

# Set up www-data user
RUN usermod -u 1000 www-data
# Clearing Group ID 1000 for later use
RUN groupmod -g 999 lsadm

# Create necessary directories
RUN mkdir -p /var/www/html/public /var/www/html/logs \
Expand Down
2 changes: 1 addition & 1 deletion openlitespeed/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Set variables
DOCKER_HUB_USERNAME="meghsh"
IMAGE_NAME="openlitespeed"
OLS_VERSION="1.8.1"
OLS_VERSION="1.8.3"

# Ensure BuildKit is enabled
export DOCKER_BUILDKIT=1
Expand Down
18 changes: 18 additions & 0 deletions openlitespeed/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
#!/bin/bash
set -e

echo "www-data UID is: $(id -u www-data) and GID $(id -g www-data)"

# Check and set PGID and PUID separately
if [ -z "$PGID" ]; then
echo "PGID not set, using default."
PGID=1000
fi

if [ -z "$PUID" ]; then
echo "PUID not set, using default."
PUID=1000
fi

echo "setting GID to $PGID and UID to $PUID"

groupmod -g $PGID www-data
usermod -u $PUID www-data

# Ensure correct permissions
chown -R www-data:www-data /var/www/html
chown -R lsadm:lsadm /usr/local/lsws
Expand Down