Reduce layers, revert back to not named entrypoints
This commit is contained in:
@@ -18,15 +18,18 @@ FROM debian:jessie-slim
|
|||||||
|
|
||||||
# Prevent the packages installation to halt.
|
# Prevent the packages installation to halt.
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
# Create the seafile client user.
|
||||||
|
ENV UNAME=seafuser
|
||||||
|
ENV UID=1000
|
||||||
|
ENV GID=1000
|
||||||
|
|
||||||
# Copy over the Docker related files.
|
# Copy over the Docker related files.
|
||||||
COPY utils/build/import-seafile-apt-key.sh assets/docker-entrypoint.sh /
|
COPY utils/build/import-seafile-apt-key.sh /
|
||||||
|
COPY assets/docker-entrypoint.sh /entrypoint.sh
|
||||||
# Copy over the required files for Seafile/SupervisorD.
|
|
||||||
COPY assets/infinite-seaf-cli-start.sh assets/seafile-entrypoint.sh /home/seafuser/
|
|
||||||
|
|
||||||
# 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 echo "deb http://deb.seadrive.org jessie main" \ > /etc/apt/source.list.d/seafile.list ;\
|
RUN echo "deb http://deb.seadrive.org jessie main" \
|
||||||
|
> /etc/apt/source.list.d/seafile.list ;\
|
||||||
bash /import-seafile-apt-key.sh ;\
|
bash /import-seafile-apt-key.sh ;\
|
||||||
apt-get update ;\
|
apt-get update ;\
|
||||||
apt-get install \
|
apt-get install \
|
||||||
@@ -45,13 +48,13 @@ RUN echo "deb http://deb.seadrive.org jessie main" \ > /etc/apt/source.list.d/se
|
|||||||
/import-seafile-apt-key.sh ;\
|
/import-seafile-apt-key.sh ;\
|
||||||
mkdir /volume/ ;\
|
mkdir /volume/ ;\
|
||||||
echo "seafuser" > /etc/cron.allow ;\
|
echo "seafuser" > /etc/cron.allow ;\
|
||||||
echo "*/20 * * * * /bin/bash /home/seafuser/infinite-seaf-cli-start.sh" > /var/spool/cron/crontabs/seafuser
|
echo "*/20 * * * * /bin/bash /home/seafuser/infinite-seaf-cli-start.sh" \
|
||||||
|
> /var/spool/cron/crontabs/seafuser \;
|
||||||
# Create the seafile client user.
|
groupadd -g $GID -o $UNAME ;\
|
||||||
ENV UNAME=seafuser
|
|
||||||
ENV UID=1000
|
|
||||||
ENV GID=1000
|
|
||||||
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
|
||||||
|
|
||||||
ENTRYPOINT ["/bin/bash", "/docker-entrypoint.sh"]
|
# Copy over the required files for Seafile/SupervisorD.
|
||||||
|
COPY assets/infinite-seaf-cli-start.sh /home/seafuser/
|
||||||
|
COPY assets/seafile-entrypoint.sh /home/seafuser/entrypoint.sh
|
||||||
|
|
||||||
|
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
|
||||||
|
|||||||
@@ -18,10 +18,18 @@ FROM debian:jessie-slim
|
|||||||
|
|
||||||
# Prevent the packages installation to halt.
|
# Prevent the packages installation to halt.
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
# Specify the user running Seafile.
|
||||||
|
ENV UNAME=seafuser
|
||||||
|
ENV UID=1000
|
||||||
|
ENV GID=1000
|
||||||
|
|
||||||
|
# Copy over the Docker related files.
|
||||||
|
COPY utils/build/import-seafile-apt-key.sh /
|
||||||
|
COPY assets/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.
|
||||||
COPY utils/build/import-seafile-apt-key.sh /
|
RUN echo "deb http://deb.seadrive.org jessie main" \
|
||||||
RUN echo "deb http://deb.seadrive.org jessie main" > /etc/apt/source.list.d/seafile.list ;\
|
> /etc/apt/source.list.d/seafile.list ;\
|
||||||
/bin/bash /import-seafile-apt-key.sh ;\
|
/bin/bash /import-seafile-apt-key.sh ;\
|
||||||
apt-get update ;\
|
apt-get update ;\
|
||||||
apt-get install \
|
apt-get install \
|
||||||
@@ -37,22 +45,13 @@ RUN echo "deb http://deb.seadrive.org jessie main" > /etc/apt/source.list.d/seaf
|
|||||||
/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
|
/import-seafile-apt-key.sh ;\
|
||||||
|
mkdir /volume ;\
|
||||||
# Create the seafile client user.
|
groupadd -g $GID -o $UNAME ;\
|
||||||
ENV UNAME=seafuser
|
|
||||||
ENV UID=1000
|
|
||||||
ENV GID=1000
|
|
||||||
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
|
||||||
|
|
||||||
# Copy over the Docker entrypoint.
|
|
||||||
COPY assets/docker-entrypoint.sh /entrypoint.sh
|
|
||||||
|
|
||||||
# Copy over the required files for Seafile/SupervisorD.
|
# Copy over the required files for Seafile/SupervisorD.
|
||||||
COPY assets/supervisord.conf /home/seafuser/
|
COPY assets/supervisord.conf assets/infinite-seaf-cli-start.sh /home/seafuser/
|
||||||
COPY assets/infinite-seaf-cli-start.sh /home/seafuser/
|
|
||||||
COPY assets/seafile-entrypoint.sh /home/seafuser/entrypoint.sh
|
COPY assets/seafile-entrypoint.sh /home/seafuser/entrypoint.sh
|
||||||
RUN mkdir /volume
|
|
||||||
|
|
||||||
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
|
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
|
||||||
|
|||||||
Reference in New Issue
Block a user