43 lines
1.6 KiB
Plaintext
43 lines
1.6 KiB
Plaintext
FROM debian:bookworm
|
|
RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
|
|
|
|
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
|
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
|
apt-get update && apt-get full-upgrade -y && apt-get install -y nginx php8.2 php8.2-common php8.2-fpm php8.2-mbstring php8.2-gd php8.2-curl php8.2-imap php8.2-zip php8.2-intl php8.2-mysql git file sudo less mariadb-client mariadb-server
|
|
|
|
WORKDIR /app
|
|
|
|
COPY app /app
|
|
|
|
#RUN apt-get update && apt-get full-upgrade -y && apt-get autoremove -y && apt-get autoclean -y
|
|
|
|
#RUN /app/scripts/sury-php-repo.sh
|
|
|
|
#RUN /app/scripts/install-dependencies.sh
|
|
|
|
#RUN git clone --branch 21.0 --single-branch --depth 1 https://github.com/Dolibarr/dolibarr.git
|
|
|
|
RUN chown -R www-data:www-data /app/dolibarr
|
|
|
|
RUN openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/dolibarr-selfsigned.key -out /etc/ssl/certs/dolibarr-selfsigned.crt -subj "/CN=dolibarr"
|
|
|
|
RUN chmod 0440 /etc/ssl/private/dolibarr-selfsigned.key && chmod 0444 /etc/ssl/certs/dolibarr-selfsigned.crt && chown www-data:www-data /etc/ssl/private/dolibarr-selfsigned.key && chown www-data:www-data /etc/ssl/certs/dolibarr-selfsigned.crt
|
|
|
|
RUN /app/scripts/create_databases.sh
|
|
|
|
RUN mv /app/dolibarr.conf /etc/nginx/sites-available/dolibarr.conf && rm /etc/nginx/sites-enabled/default
|
|
|
|
ENV PORT=8080
|
|
|
|
EXPOSE 8080
|
|
|
|
#CMD ["/app/launch-daemons.sh"]
|
|
VOLUME ["/mnt/dolibarr_vol"]
|
|
|
|
ENTRYPOINT ["/app/scripts/launch-daemons.sh"]
|
|
|
|
HEALTHCHECK --interval=5m --timeout=30s \
|
|
CMD /app/scripts/healthchecker.sh || exit 1
|
|
|
|
|