2020-12-10 18:00:13 +03:00
|
|
|
#
|
|
|
|
# https://syspass.org
|
|
|
|
# https://doc.syspass.org
|
|
|
|
#
|
|
|
|
|
2020-12-10 18:07:53 +03:00
|
|
|
FROM composer:2.0 as bootstrap
|
2020-12-10 18:00:13 +03:00
|
|
|
|
|
|
|
ENV SYSPASS_BRANCH="master"
|
|
|
|
|
|
|
|
RUN git clone --branch ${SYSPASS_BRANCH} https://github.com/nuxsmin/sysPass.git \
|
|
|
|
&& composer install \
|
|
|
|
--ignore-platform-reqs \
|
|
|
|
--no-interaction \
|
|
|
|
--no-plugins \
|
|
|
|
--no-scripts \
|
|
|
|
--prefer-dist \
|
|
|
|
--optimize-autoloader \
|
|
|
|
--working-dir /app/sysPass
|
|
|
|
|
2020-12-10 18:07:53 +03:00
|
|
|
FROM php:7.3-apache-buster as app
|
2020-12-10 18:00:13 +03:00
|
|
|
|
|
|
|
LABEL maintainer=nuxsmin@syspass.org version=3.1.2 php=7.3
|
|
|
|
|
2020-12-10 18:07:53 +03:00
|
|
|
##################################################################
|
|
|
|
# adding normal sources list
|
|
|
|
##################################################################
|
|
|
|
RUN rm /etc/apt/sources.list
|
|
|
|
COPY sources.list /etc/apt/sources.list
|
|
|
|
|
|
|
|
##################################################################
|
|
|
|
# installing php repo + smbclient
|
|
|
|
##################################################################
|
|
|
|
RUN wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
|
|
|
|
RUN sh -c 'echo "deb https://packages.sury.org/php/ buster main" > /etc/apt/sources.list.d/php.list'
|
|
|
|
RUN apt update -y && apt install -y --allow-unauthenticated smbclient libsmbclient libsmbclient-dev
|
|
|
|
RUN pecl install smbclient
|
|
|
|
RUN docker-php-ext-enable smbclient
|
|
|
|
|
|
|
|
##################################################################
|
|
|
|
# smb fix
|
|
|
|
##################################################################
|
|
|
|
RUN rm -frv /etc/samba/smb.conf /usr/share/samba/smb.conf
|
|
|
|
ADD smb.conf /etc/samba/
|
|
|
|
ADD smb.conf /usr/share/samba/
|
|
|
|
|
2020-12-10 18:00:13 +03:00
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get install -y \
|
|
|
|
locales \
|
|
|
|
git \
|
|
|
|
gosu \
|
|
|
|
libicu-dev \
|
|
|
|
libldb-dev \
|
|
|
|
libldap2-dev \
|
|
|
|
libfreetype6-dev \
|
|
|
|
libjpeg62-turbo-dev \
|
|
|
|
libpng-dev \
|
|
|
|
unzip \
|
|
|
|
ssl-cert \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -r /var/lib/apt/lists/* \
|
|
|
|
&& pecl install xdebug-2.7.1 \
|
|
|
|
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
|
|
|
|
&& docker-php-ext-install -j$(nproc) ldap intl gettext pdo_mysql opcache gd \
|
|
|
|
&& docker-php-ext-enable ldap xdebug intl pdo_mysql
|
|
|
|
|
|
|
|
ENV APACHE_RUN_USER="www-data" \
|
|
|
|
SYSPASS_DIR="/var/www/html/sysPass" \
|
|
|
|
SYSPASS_UID=9001 \
|
|
|
|
SYSPASS_DEV=0
|
|
|
|
|
|
|
|
WORKDIR /var/www/html
|
|
|
|
|
|
|
|
LABEL build=19030701
|
|
|
|
|
|
|
|
# Custom sysPass Apache config with SSL by default
|
|
|
|
COPY ["syspass.conf", "/etc/apache2/sites-available/"]
|
|
|
|
|
|
|
|
# Xdebug module config
|
|
|
|
COPY xdebug.ini /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
|
|
|
|
|
|
|
|
# Custom entrypoint
|
|
|
|
COPY entrypoint.sh init-functions /usr/local/sbin/
|
|
|
|
|
|
|
|
RUN chmod 755 /usr/local/sbin/entrypoint.sh \
|
|
|
|
&& a2dissite 000-default default-ssl \
|
|
|
|
&& a2ensite syspass \
|
|
|
|
&& a2enmod proxy_fcgi setenvif ssl rewrite \
|
|
|
|
&& ln -sf /dev/stdout ${APACHE_LOG_DIR}/access.log \
|
|
|
|
&& ln -sf /dev/stderr ${APACHE_LOG_DIR}/error.log
|
|
|
|
|
|
|
|
# sysPass dependencies
|
|
|
|
COPY --from=bootstrap /app/sysPass/ ${SYSPASS_DIR}/
|
|
|
|
|
|
|
|
# Composer binary
|
|
|
|
COPY --from=bootstrap /usr/bin/composer /usr/bin/
|
|
|
|
|
|
|
|
EXPOSE 80 443
|
|
|
|
|
|
|
|
ENTRYPOINT ["/usr/local/sbin/entrypoint.sh"]
|
|
|
|
|
|
|
|
CMD ["apache"]
|