2019-04-13 18:45:06 +00:00
|
|
|
FROM python:3-slim
|
2018-04-18 16:32:41 +00:00
|
|
|
|
2019-01-17 19:12:42 +00:00
|
|
|
RUN apt-get update && apt-get install gnupg -y
|
2018-04-18 16:32:41 +00:00
|
|
|
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8756C4F765C9AC3CB6B85D62379CE192D401AB61 && \
|
2019-01-17 19:12:42 +00:00
|
|
|
echo deb http://deb.seadrive.org stretch main | tee /etc/apt/sources.list.d/seafile.list && \
|
2018-04-18 16:32:41 +00:00
|
|
|
apt-get update -y && \
|
2018-04-18 18:45:25 +00:00
|
|
|
apt-get install -y seafile-cli procps curl 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
|
|
|
|
2019-04-13 18:45:06 +00:00
|
|
|
COPY start.py /seafile-client/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"
|
|
|
|
|
|
2019-04-13 18:45:06 +00:00
|
|
|
CMD ["./start.py"]
|