Skip to content

Commit

Permalink
update to ubuntu 18.04 and php7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Kaupat committed Sep 28, 2020
1 parent 50648d9 commit 17f097f
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 13 deletions.
19 changes: 19 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
kind: pipeline
name: default

steps:
- name: publish
image: plugins/docker
when:
event:
- tag
- push

settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
auto_tag: true # "latest" is only tagged on master 'push' event.
repo: lobaro/xentral-docker
31 changes: 18 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@
# See also: https://github.com/mpneuried/docker_wawision/blob/master/Dockerfile
# We use ubuntu 17 because php-mcrypt is missing in ubuntu 18
# We used ubuntu 17 because php-mcrypt is missing in ubuntu 18
# see: https://askubuntu.com/questions/1031921/php-mcrypt-package-missing-in-ubuntu-server-18-04-lts
FROM ubuntu:17.10
FROM ubuntu:18.04

ENV XENTRAL_DOWNLOAD https://update.xentral.biz/download/19.1.1c1c4f2_oss_wawision.zip
#ENV XENTRAL_DOWNLOAD https://update.xentral.biz/download/19.1.1c1c4f2_oss_wawision.zip
ENV XENTRAL_INSTALLER_DOWNLOAD https://github.com/xentral-erp-software-gmbh/downloads/raw/master/installer.zip

# tzdata is needed for php-fpm
ENV TZ Europe/Berlin

# todo: needed?
ENV TERM=xterm

RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata

# install required system components
RUN apt-get update \
&& apt-get install -y wget unzip cron \
&& apt-get install -y apache2 \
&& apt-get install -y php libapache2-mod-php php-mcrypt php-mysql php-cli \
&& apt-get install -y php-mysql php-soap php-imap php-fpm php-zip php-gd php-xml php-curl php-mbstring php7.1-ldap \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata \
&& apt-get install -y php libapache2-mod-php php-mysql php-cli \
&& apt-get install -y php-mysql php-soap php-imap php-fpm php-zip php-gd php-xml php-curl php-mbstring php-ldap \
&& apt-get clean && rm -rf /var/lib/apt/lists/*



# install apache
RUN echo "ServerName 0.0.0.0" >> /etc/apache2/apache2.conf
RUN apache2ctl configtest
Expand All @@ -29,22 +34,22 @@ RUN a2enmod rewrite
RUN phpenmod imap

# install ioncube
RUN wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz \
RUN wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz \
&& tar xfz ioncube_loaders_lin_x86-64.tar.gz && rm ioncube_loaders_lin_x86-64.tar.gz \
&& cp ./ioncube/loader-wizard.php /var/www/html/loader-wizard.php.bak \
&& cp ./ioncube/ioncube_loader_lin_7.1.so $(php -i | grep extension_dir | awk '{print $3}') \
&& cp ./ioncube/ioncube_loader_lin_7.2.so $(php -i | grep extension_dir | awk '{print $3}') \
&& rm -rf ./ioncube \
&& echo "zend_extension = \"$(php -i | grep extension_dir | awk '{print $3}')/ioncube_loader_lin_7.1.so\"" > /etc/php/7.1/apache2/conf.d/00-ioncube.ini \
&& chmod 777 /etc/php/7.1/apache2/conf.d/00-ioncube.ini \
&& echo "zend_extension = \"$(php -i | grep extension_dir | awk '{print $3}')/ioncube_loader_lin_7.2.so\"" > /etc/php/7.2/apache2/conf.d/00-ioncube.ini \
&& chmod 777 /etc/php/7.2/apache2/conf.d/00-ioncube.ini \
# zend extention for running PHP from bash e.g. for CRON
&& ln -s /etc/php/7.1/apache2/conf.d/00-ioncube.ini /etc/php/7.1/cli/conf.d/00-ioncube.ini
&& ln -s /etc/php/7.2/apache2/conf.d/00-ioncube.ini /etc/php/7.2/cli/conf.d/00-ioncube.ini

# Install Xentral (wawision)
WORKDIR /var/www/html/

RUN wget -O ./wawision.zip ${XENTRAL_DOWNLOAD} \
RUN wget -O ./xentral.zip ${XENTRAL_INSTALLER_DOWNLOAD} \
&& rm index.html \
&& unzip wawision.zip -d /var/www/html/ \
&& unzip xentral.zip -d /var/www/html/ \
&& chown -R www-data: /var/www/html/
# in case of tar.gz use:
#RUN tar -xzf wawision.tar.gz -C /var/www/html/ --strip-components=1
Expand Down

0 comments on commit 17f097f

Please sign in to comment.