Skip to content

Updated Dockerfile to Support php8 and osTicket 1.17.5 #93

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
21 changes: 10 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
# Deployment doesn't work on Alpine
FROM php:7.3-cli AS deployer
ENV OSTICKET_VERSION=1.14.3
FROM php:8.0-cli AS deployer
ENV OSTICKET_VERSION=1.17.5
RUN set -x \
&& apt-get update \
&& apt-get install -y git-core \
&& git clone -b v${OSTICKET_VERSION} --depth 1 https://github.com/osTicket/osTicket.git \
&& cd osTicket \
&& php manage.php deploy -sv /data/upload \
# www-data is uid:gid 82:82 in php:7.0-fpm-alpine
&& mkdir /data/upload/images/attachments \
&& chown -R 82:82 /data/upload \
# Hide setup
&& mv /data/upload/setup /data/upload/setup_hidden \
&& chown -R root:root /data/upload/setup_hidden \
&& chmod -R go= /data/upload/setup_hidden

FROM php:7.3-fpm-alpine
MAINTAINER Martin Campbell <martin@campbellsoftware.co.uk>
FROM php:8.0-fpm-alpine
MAINTAINER Martin Campbell <martin@campbellsoftware.co.uk>. Updated to support php 8 and osticket 1.17.5 by Bob Weston and MrDrache333
# environment for osticket
ENV HOME=/data
# setup workdir
WORKDIR /data
COPY --from=deployer /data/upload upload
RUN apk add --no-cache libzip-dev zip && docker-php-ext-configure zip && docker-php-ext-install zip && docker-php-ext-install pdo pdo_mysql

RUN set -x && \
# requirements and PHP extensions
apk add --no-cache --update \
wget \
msmtp \
Expand All @@ -45,10 +45,11 @@ RUN set -x && \
libxml2-dev \
icu-dev \
autoconf \
linux-headers \
g++ \
make \
pcre-dev && \
docker-php-ext-install gd curl ldap mysqli sockets gettext mbstring xml intl opcache && \
docker-php-ext-install gd curl ldap mysqli sockets gettext xml intl opcache && \
docker-php-ext-configure imap --with-imap-ssl && \
docker-php-ext-install imap && \
pecl install apcu && docker-php-ext-enable apcu && \
Expand All @@ -62,15 +63,13 @@ RUN set -x && \
wget -nv -O upload/include/i18n/es_ES.phar https://s3.amazonaws.com/downloads.osticket.com/lang/es_ES.phar && \
wget -nv -O upload/include/i18n/de.phar https://s3.amazonaws.com/downloads.osticket.com/lang/de.phar && \
mv upload/include/i18n upload/include/i18n.dist && \
# Download LDAP plugin
wget -nv -O upload/include/plugins/auth-ldap.phar https://s3.amazonaws.com/downloads.osticket.com/plugin/auth-ldap.phar && \
# Create msmtp log
touch /var/log/msmtp.log && \
chown www-data:www-data /var/log/msmtp.log && \
# File upload permissions
mkdir -p /var/tmp/nginx && \
chown nginx:www-data /var/tmp/nginx && chmod g+rx /var/tmp/nginx
COPY files/ /
VOLUME ["/data/upload/include/plugins","/data/upload/include/i18n","/var/log/nginx"]
VOLUME ["/data/upload/include/plugins","/data/upload/include/i18n","/var/log/nginx","/data/upload/images/attachments"]
EXPOSE 80
CMD ["/data/bin/start.sh"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ docker-osticket

# Introduction

Docker image for running version 1.14.3 of [OSTicket](http://osticket.com/).
Docker image for running version 1.17.5 of [OSTicket](http://osticket.com/).

This image has been created from the original docker-osticket image by [Petter A. Helset](mailto:petter@helset.eu).

Expand Down