forked from joeybaker/docker-syncthing
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (32 loc) · 1.4 KB
/
Dockerfile
File metadata and controls
41 lines (32 loc) · 1.4 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
# ubunut 15 saves about 50MB over ubuntu stable
FROM ubuntu:15.10
MAINTAINER Joey Baker <joey@byjoeybaker.com>
ENV SYNCTHING_VERSION 0.13.4
RUN apt-get update \
&& apt-get upgrade -y --no-install-recommends \
&& apt-get install curl ca-certificates -y --no-install-recommends \
&& apt-get autoremove -y \
&& apt-get clean
# grab gosu for easy step-down from root
RUN gpg --keyserver pgp.mit.edu --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
&& curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture)" \
&& curl -o /usr/local/bin/gosu.asc -L "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture).asc" \
&& gpg --verify /usr/local/bin/gosu.asc \
&& rm /usr/local/bin/gosu.asc \
&& chmod +x /usr/local/bin/gosu
# get syncthing
WORKDIR /srv
RUN useradd --no-create-home -g users syncthing
RUN curl -L -o syncthing.tar.gz https://github.com/syncthing/syncthing/releases/download/v$SYNCTHING_VERSION/syncthing-linux-amd64-v$SYNCTHING_VERSION.tar.gz \
&& tar -xzvf syncthing.tar.gz \
&& rm -f syncthing.tar.gz \
&& mv syncthing-linux-amd64-v* syncthing \
&& rm -rf syncthing/etc \
&& rm -rf syncthing/*.pdf \
&& mkdir -p /srv/config \
&& mkdir -p /srv/data
VOLUME ["/srv/data", "/srv/config"]
ADD ./start.sh /srv/start.sh
RUN chmod 770 /srv/start.sh
ENV UID=1027
ENTRYPOINT ["/srv/start.sh"]