forked from wiserain/docker-plexdrive
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
54 lines (48 loc) · 1.61 KB
/
Copy pathDockerfile
File metadata and controls
54 lines (48 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
FROM ubuntu:18.04
MAINTAINER wiserain
# global environment settings
ENV PLEXDRIVE_VERSION="5.0.0"
ENV PLATFORM_ARCH="amd64"
# s6 environment settings
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
ENV S6_KEEP_ENV=1
# install packages
RUN \
echo "**** install runtime packages ****" && \
apt-get update && \
apt-get install -y \
ca-certificates \
fuse && \
update-ca-certificates && \
apt-get install -y openssl && \
sed -i 's/#user_allow_other/user_allow_other/' /etc/fuse.conf && \
echo "**** install build packages ****" && \
apt-get install -y \
curl \
unzip \
wget && \
echo "**** add s6 overlay ****" && \
OVERLAY_VERSION=$(curl -sX GET "https://api.github.com/repos/just-containers/s6-overlay/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') && \
curl -o /tmp/s6-overlay.tar.gz -L "https://github.com/just-containers/s6-overlay/releases/download/${OVERLAY_VERSION}/s6-overlay-amd64.tar.gz" && \
tar xfz /tmp/s6-overlay.tar.gz -C / && \
echo "**** add plexdrive ****" && \
cd /tmp && \
wget https://github.com/dweidenfeld/plexdrive/releases/download/${PLEXDRIVE_VERSION}/plexdrive-linux-${PLATFORM_ARCH} && \
mv plexdrive-linux-${PLATFORM_ARCH} /usr/bin/plexdrive && \
chmod 777 /usr/bin/plexdrive && \
echo "**** create abc user ****" && \
groupmod -g 1000 users && \
useradd -u 911 -U -d /config -s /bin/false abc && \
usermod -G users abc && \
echo "**** cleanup ****" && \
apt-get purge -y \
curl \
unzip \
wget && \
apt-get clean autoclean && \
apt-get autoremove -y && \
rm -rf /tmp/* /var/lib/{apt,dpkg,cache,log}/
# add local files
COPY root/ /
VOLUME /config /data
ENTRYPOINT ["/init"]