Skip to content

Commit

Permalink
Fix typo and hadolint
Browse files Browse the repository at this point in the history
  • Loading branch information
llaumgui committed Sep 17, 2023
1 parent 628d923 commit ad4f4fc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
27 changes: 17 additions & 10 deletions 8.2-nextcloud/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,37 +13,42 @@ LABEL org.opencontainers.image.version="8.2"
# Fix hadolint #DL4006 (https://github.com/hadolint/hadolint/wiki/DL4006)
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

RUN apt-get update

# ----------------------------------------------------------------- Install cron
RUN apt-get install -y --no-install-recommends \
RUN apt-get update && apt-get install --no-install-recommends -y \
busybox-static && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
mkdir -p /var/spool/cron/crontabs && \
echo '*/5 * * * * php -f /var/www/cron.php' > /var/spool/cron/crontabs/www-data
COPY --chmod=755 cron.sh /


# ------------------------------------------------------------------ Supervisord
RUN apt-get install -y --no-install-recommends \
RUN apt-get update && apt-get install --no-install-recommends -y \
# Install supervisor to start multiple processes on container startup \
supervisor
supervisor&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN mkdir "/var/run/supervisor"
RUN rm -rf /etc/supervisor/*
COPY supervisor/*.conf /etc/supervisor
COPY supervisor/*.sh /


# ----------------------------------------------------- Install Search and cron utilities
RUN apt-get install -y --no-install-recommends \
RUN apt-get update && apt-get install --no-install-recommends -y \
# Install tesseract and ocrmypdf for OCR \
tesseract-ocr \
tesseract-ocr-fra \
tesseract-ocr-eng \
ocrmypdf
ocrmypdf && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*


# ------------------------------------------------------------ Install utilities
RUN apt-get install -y --no-install-recommends \
RUN apt-get update && apt-get install --no-install-recommends -y \
# Misc tools \
bzip2 \
curl \
Expand All @@ -56,7 +61,9 @@ RUN apt-get install -y --no-install-recommends \
libzip4 \
procps \
unzip \
wget
wget && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*


# --------------------------------------------------------- Install dependancies
Expand Down Expand Up @@ -87,7 +94,7 @@ RUN fetchDeps=" \
libpq-dev \
zlib1g-dev" ; \
apt-get update ; \
apt-get install -y --no-install-recommends ${fetchDeps}; \
apt-get install --no-install-recommends -y ${fetchDeps}; \
\
\
# ------------------------------------------------------- Install php extensions \
Expand Down Expand Up @@ -129,7 +136,7 @@ RUN fetchDeps=" \
\
# ------------------------------------------------------------------ Big cleanup \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false ${fetchDeps}; \
apt clean && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* \
/tmp/* \
/var/tmp/* \
Expand Down
2 changes: 1 addition & 1 deletion 8.2-nextcloud/supervisor/nc_fulltextsearch_live.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

# If fulltextsearch is present: stop all running indexes before start live.
[ -d /var/www/apps/fulltextsearch ] && echo php /var/www/occ fulltextsearch:stop
[ -d /var/www/apps/fulltextsearch ] && php /var/www/occ fulltextsearch:stop

# If fulltextsearch is present: start live index
[ -d /var/www/apps/fulltextsearch ] && php /var/www/occ fulltextsearch:live

0 comments on commit ad4f4fc

Please sign in to comment.