Move changes from the project's Dockerfile here

This commit is contained in:
flow.gunso
2019-12-30 09:55:52 +01:00
parent 2412ada16a
commit 9af5f1bde9

View File

@@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
FROM debian:jessie-slim FROM debian:buster-slim
# Prevent the packages installation to halt. # Prevent the packages installation to halt.
ENV DEBIAN_FRONTEND noninteractive ENV DEBIAN_FRONTEND noninteractive
@@ -28,30 +28,35 @@ COPY utils/build/import-seafile-apt-key.sh /
COPY assets/cron/docker-entrypoint.sh /entrypoint.sh COPY assets/cron/docker-entrypoint.sh /entrypoint.sh
# Safely import Seafile APT key, then install both seafile-cli and supervisord. # Safely import Seafile APT key, then install both seafile-cli and supervisord.
RUN mkdir -p /etc/apt/sources.list.d/ ;\ RUN mkdir -p /etc/apt/sources.list.d/ && \
echo "deb http://deb.seadrive.org jessie main" \ apt-get update && \
> /etc/apt/sources.list.d/seafile.list ;\ apt-get install -y gnupg && \
bash /import-seafile-apt-key.sh ;\ echo "deb http://deb.seadrive.org buster main" \
apt-get update ;\ > /etc/apt/sources.list.d/seafile.list && \
bash /import-seafile-apt-key.sh && \
apt-get remove -y gnupg && \
apt-get autoremove -y && \
apt-get update && \
apt-get install \ apt-get install \
-o Dpkg::Options::="--force-confold" \ -o Dpkg::Options::="--force-confold" \
-y \ -y \
seafile-cli \ seafile-cli \
cron ;\ cron && \
apt-get clean ;\ apt-get clean && \
apt-get autoclean \ apt-get autoclean \
-o APT::Clean-Installed=true ;\ -o APT::Clean-Installed=true && \
rm \ rm \
-f \ -rf \
/var/log/fsck/*.log \ /var/log/fsck/*.log \
/var/log/apt/*.log \ /var/log/apt/*.log \
/var/cache/debconf/*.dat-old \ /var/cache/debconf/*.dat-old \
/import-seafile-apt-key.sh ;\ /var/lib/apt/lists/* \
mkdir /volume/ ;\ /import-seafile-apt-key.sh && \
echo "seafuser" > /etc/cron.allow ;\ mkdir /volume/ && \
echo "seafuser" > /etc/cron.allow && \
echo "*/20 * * * * /bin/bash /home/seafuser/seafile-healthcheck.sh" \ echo "*/20 * * * * /bin/bash /home/seafuser/seafile-healthcheck.sh" \
> /var/spool/cron/crontabs/seafuser ;\ > /var/spool/cron/crontabs/seafuser && \
groupadd -g $GID -o $UNAME ;\ groupadd -g $GID -o $UNAME && \
useradd -m -u $UID -g $GID -o -s /bin/bash $UNAME useradd -m -u $UID -g $GID -o -s /bin/bash $UNAME
# Copy over the required files for Seafile/SupervisorD. # Copy over the required files for Seafile/SupervisorD.