otrs/Dockerfile
2023-04-24 15:33:28 +10:00

33 lines
1.4 KiB
Docker

# NAME leenooks/otrs
# VERSION latest
FROM alpine
# Change to http respositories, so they we can cache the install packages
RUN if [ -n ${HTTP_PROXY} ] ; then sed -ie s'/https/http/' /etc/apk/repositories; fi
RUN apk add shadow && groupadd -g 48 apache && useradd -d /opt/otrs -g apache -c 'OTRS user' otrs
RUN apk add --no-cache nginx curl
RUN usermod nginx -G apache
RUN apk add --no-cache perl perl-fcgi fcgiwrap
RUN apk add --no-cache perl-dbi perl-dbd-mysql perl-dbd-pg
RUN apk add --no-cache perl-archive-zip perl-crypt-eksblowfish perl-css-minifier-xs perl-date-format \
perl-datetime perl-encode-hanextra perl-io-socket-ssl perl-javascript-minifier-xs perl-json-xs \
perl-mail-imapclient perl-authen-sasl perl-authen-ntlm perl-moo perl-net-dns perl-ldap perl-package-stash-xs \
perl-template-toolkit perl-text-csv_xs perl-yaml-xs perl-xml-libxml perl-xml-libxslt perl-xml-parser
#RUN apk add apache2-mod-perl --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/
RUN cd /tmp/ && wget https://download.znuny.org/releases/znuny-6.0.48.tar.gz \
&& tar -C /opt -xzf /tmp/znuny-6.0.48.tar.gz && ln -s ./znuny-6.0.48 /opt/otrs \
&& rm /tmp/znuny-6.0.48.tar.gz \
&& mkdir /opt/otrs/Kernel/Files \
&& /opt/otrs/bin/otrs.CheckModules.pl \
&& /opt/otrs/bin/otrs.SetPermissions.pl
COPY otrs.conf /etc/nginx/http.d/default.conf
COPY init /sbin
CMD [ "/sbin/init" ]