docker-seafile-client/Dockerfile

26 lines
893 B
Docker
Raw Normal View History

2019-04-13 18:45:06 +00:00
FROM python:3-slim
2018-04-18 16:32:41 +00:00
RUN apt-get update && apt-get install gnupg curl -y && rm -rf /var/lib/apt/lists/*
2021-01-30 19:39:34 +00:00
RUN curl https://linux-clients.seafile.com/seafile.asc | apt-key add - && \
echo 'deb [arch=amd64] https://linux-clients.seafile.com/seafile-deb/buster/ stable main' > /etc/apt/sources.list.d/seafile.list && \
2018-04-18 16:32:41 +00:00
apt-get update -y && \
apt-get install -y seafile-cli procps grep && \
2018-04-18 16:32:41 +00:00
rm -rf /var/lib/apt/lists/*
WORKDIR /seafile-client
2019-04-13 18:45:06 +00:00
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
2018-04-18 16:32:41 +00:00
COPY seafile_client ./seafile_client/
COPY start.py ./start.py
2018-04-18 16:32:41 +00:00
2019-04-13 18:45:06 +00:00
RUN chmod +x /seafile-client/start.py && \
2018-04-18 16:32:41 +00:00
useradd -U -d /seafile-client -s /bin/bash seafile && \
usermod -G users seafile && \
chown seafile:seafile -R /seafile-client && \
su - seafile -c "seaf-cli init -d /seafile-client"
2021-02-28 20:27:26 +00:00
VOLUME /seafile-client/seafile-data
2019-04-13 18:45:06 +00:00
CMD ["./start.py"]