Add the new entrypoint
This commit is contained in:
22
Dockerfile
22
Dockerfile
@@ -19,18 +19,6 @@ FROM debian:jessie
|
|||||||
# Prevent the packages installation to halt.
|
# Prevent the packages installation to halt.
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
|
||||||
# Prepare the directories.
|
|
||||||
RUN mkdir /.seafile ;\
|
|
||||||
mkdir /.supervisord ;\
|
|
||||||
mkdir /volume
|
|
||||||
|
|
||||||
# Put the core functionalities into the image.
|
|
||||||
COPY assets/seafile.list /etc/apt/sources.list.d/
|
|
||||||
COPY assets/supervisord.conf /.supervisord/
|
|
||||||
COPY assets/infinite-seaf-cli-start.sh /
|
|
||||||
COPY entrypoint.sh /
|
|
||||||
RUN chmod 777 /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.
|
||||||
COPY utils/build/import-seafile-apt-key.sh /
|
COPY utils/build/import-seafile-apt-key.sh /
|
||||||
RUN /bin/bash /import-seafile-apt-key.sh ;\
|
RUN /bin/bash /import-seafile-apt-key.sh ;\
|
||||||
@@ -38,11 +26,19 @@ RUN /bin/bash /import-seafile-apt-key.sh ;\
|
|||||||
apt-get install -o Dpkg::Options::="--force-confold" -y seafile-cli supervisor
|
apt-get install -o Dpkg::Options::="--force-confold" -y seafile-cli supervisor
|
||||||
RUN rm -f /import-seafile-apt-key.sh
|
RUN rm -f /import-seafile-apt-key.sh
|
||||||
|
|
||||||
# Configure the user.
|
# Create the seafile client user.
|
||||||
ENV UNAME=seafuser
|
ENV UNAME=seafuser
|
||||||
ENV UID=1000
|
ENV UID=1000
|
||||||
ENV GID=1000
|
ENV GID=1000
|
||||||
RUN groupadd -g $GID -o $UNAME ;\
|
RUN 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
|
||||||
|
|
||||||
|
# Put the core functionalities into the image.
|
||||||
|
COPY assets/seafile.list /etc/apt/sources.list.d/
|
||||||
|
COPY entrypoint.sh /
|
||||||
|
# and the ones for the seafile client user.
|
||||||
|
COPY assets/supervisord.conf /home/seafuser/
|
||||||
|
COPY assets/infinite-seaf-cli-start.sh /home/seafuser/
|
||||||
|
COPY assets/entrypoint.sh /home/seafuser/
|
||||||
|
|
||||||
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
|
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
|
||||||
|
|||||||
Reference in New Issue
Block a user