Updated debian to bullseye and improved client installation
This commit is contained in:
committed by
flow.gunso
parent
2c9b66e5f3
commit
710b3818f1
@@ -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:buster-slim
|
FROM debian:bullseye-slim
|
||||||
|
|
||||||
ARG BUILD_DATE
|
ARG BUILD_DATE
|
||||||
ARG VCS_REF
|
ARG VCS_REF
|
||||||
@@ -32,19 +32,18 @@ LABEL maintainer="flow.gunso@gmail.com" \
|
|||||||
org.label-schema.schema-version="1.0"
|
org.label-schema.schema-version="1.0"
|
||||||
|
|
||||||
# Copy over the assets.
|
# Copy over the assets.
|
||||||
COPY docker-entrypoint.sh /entrypoint.sh
|
COPY seafile-client/docker-entrypoint.sh /entrypoint.sh
|
||||||
COPY docker-healthcheck.sh /healthcheck.sh
|
COPY seafile-client/docker-healthcheck.sh /healthcheck.sh
|
||||||
COPY tests /tests
|
COPY tests /tests
|
||||||
|
|
||||||
# Install seaf-cli and oathtool, prepare the user.
|
# Install seaf-cli and oathtool, prepare the user.
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
ENV UNAME=seafuser UID=1000 GID=1000
|
ENV UNAME=seafuser UID=1000 GID=1000
|
||||||
COPY import-seafile-apt-key.sh /
|
RUN apt-get update && apt-get install -y gnupg wget && \
|
||||||
RUN apt-get update && apt-get install -y gnupg && \
|
|
||||||
mkdir -p /etc/apt/sources.list.d/ && \
|
mkdir -p /etc/apt/sources.list.d/ && \
|
||||||
echo "deb http://deb.seadrive.org buster main" > /etc/apt/sources.list.d/seafile.list && \
|
wget https://linux-clients.seafile.com/seafile.asc -O /usr/share/keyrings/seafile-keyring.asc && \
|
||||||
bash /import-seafile-apt-key.sh && \
|
bash -c "echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/seafile-keyring.asc] https://linux-clients.seafile.com/seafile-deb/bullseye/ stable main' > /etc/apt/sources.list.d/seafile.list" && \
|
||||||
apt-get purge --yes gnupg && apt-get autoremove --yes && \
|
apt-get purge --yes gnupg wget && apt-get autoremove --yes && \
|
||||||
apt-get update && apt-get install \
|
apt-get update && apt-get install \
|
||||||
--no-install-recommends \
|
--no-install-recommends \
|
||||||
--yes \
|
--yes \
|
||||||
@@ -56,18 +55,17 @@ RUN apt-get update && apt-get install -y gnupg && \
|
|||||||
/var/log/apt/*.log \
|
/var/log/apt/*.log \
|
||||||
/var/cache/debconf/*.dat-old \
|
/var/cache/debconf/*.dat-old \
|
||||||
/var/lib/apt/lists/* \
|
/var/lib/apt/lists/* \
|
||||||
/import-seafile-apt-key.sh && \
|
|
||||||
mkdir /library/ && \
|
mkdir /library/ && \
|
||||||
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 && \
|
||||||
mkdir /home/$UNAME/.seafile && \
|
mkdir /home/$UNAME/.seafile && \
|
||||||
chown $UNAME:$GID /home/$UNAME/.seafile
|
chown $UNAME:$GID /home/$UNAME/.seafile
|
||||||
|
|
||||||
COPY seafile-entrypoint.sh /home/seafuser/entrypoint.sh
|
COPY seafile-client/seafile-entrypoint.sh /home/seafuser/entrypoint.sh
|
||||||
COPY seafile-healthcheck.py /home/seafuser/healthcheck.py
|
COPY seafile-client/seafile-healthcheck.py /home/seafuser/healthcheck.py
|
||||||
RUN chmod +x /home/$UNAME/healthcheck.py && \
|
RUN chmod +x /home/$UNAME/healthcheck.py && \
|
||||||
chown $UNAME:$GID /home/$UNAME/
|
chown $UNAME:$GID /home/$UNAME/
|
||||||
|
|
||||||
ENTRYPOINT ["/bin/bash", "--"]
|
ENTRYPOINT ["/bin/bash", "--"]
|
||||||
CMD ["/entrypoint.sh"]
|
CMD ["/entrypoint.sh"]
|
||||||
HEALTHCHECK --start-period=1m CMD /healthcheck.sh
|
HEALTHCHECK --start-period=1m CMD /healthcheck.sh
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Docker Seafile client, help you mount a Seafile library as a volume.
|
|
||||||
# Copyright (C) 2019-2020, flow.gunso@gmail.com
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
not_imported=true
|
|
||||||
while $not_imported; do
|
|
||||||
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8756C4F765C9AC3CB6B85D62379CE192D401AB61
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
not_imported=false
|
|
||||||
else
|
|
||||||
sleep 5
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
Reference in New Issue
Block a user