mirror of
https://github.com/linuxserver/docker-syncthing.git
synced 2026-02-19 20:04:00 +08:00
commit
94deac1613
35
Dockerfile
35
Dockerfile
@ -1,24 +1,19 @@
|
||||
FROM linuxserver/baseimage
|
||||
MAINTAINER lonix <lonixx@gmail.com>
|
||||
ENV APTLIST="syncthing"
|
||||
FROM lsiobase/alpine
|
||||
MAINTAINER sparklyballs
|
||||
|
||||
#Applying stuff
|
||||
RUN curl -s https://syncthing.net/release-key.txt | apt-key add - && \
|
||||
echo deb http://apt.syncthing.net/ syncthing release | tee /etc/apt/sources.list.d/syncthing-release.list && \
|
||||
apt-get update -q && \
|
||||
apt-get install -qy $APTLIST && \
|
||||
# environment settings
|
||||
ENV HOME="/config"
|
||||
|
||||
# give abc home folder of /config
|
||||
usermod -d /config abc && \
|
||||
# install packages
|
||||
RUN \
|
||||
apk add --no-cache \
|
||||
--repository http://nl.alpinelinux.org/alpine/edge/community \
|
||||
syncthing \
|
||||
syncthing-utils
|
||||
|
||||
# clean up
|
||||
apt-get clean && \
|
||||
rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/*
|
||||
# add local files
|
||||
COPY root/ /
|
||||
|
||||
#Adding Custom files
|
||||
ADD services/ /etc/service/
|
||||
RUN chmod -v +x /etc/service/*/run /etc/my_init.d/*.sh
|
||||
|
||||
# Volumes and Ports
|
||||
VOLUME ["/config", "/sync"]
|
||||
EXPOSE 8384 22000 21027/UDP
|
||||
# ports and volumes
|
||||
EXPOSE 8384 22000 21027/UDP
|
||||
VOLUME /config /sync
|
||||
|
||||
21
README.md
21
README.md
@ -3,6 +3,7 @@
|
||||
The [LinuxServer.io](https://linuxserver.io) team brings you another container release featuring auto-update on startup, easy user mapping and community support. Find us for support at:
|
||||
* [forum.linuxserver.io](https://forum.linuxserver.io)
|
||||
* [IRC](https://www.linuxserver.io/index.php/irc/) on freenode at `#linuxserver.io`
|
||||
* [Podcast](https://www.linuxserver.io/index.php/category/podcast/) covers everything to do with getting the most from your Linux Server plus a focus on all things Docker and containerisation!
|
||||
|
||||
# linuxserver/syncthing
|
||||
|
||||
@ -34,14 +35,18 @@ docker create \
|
||||
* `-p 22000` Listening Port
|
||||
* `-p 21027/udp` Discovery Port
|
||||
|
||||
It is based on alpine linux with s6 overlay, for shell access whilst the container is running do `docker exec -it syncthing /bin/bash`.
|
||||
|
||||
### User / Group Identifiers
|
||||
|
||||
Sometimes when using data volumes (`-v` flags) permissions issues can arise between the host OS and the container. We avoid this issue by allowing you to specify the user `PUID` and group `PGID`. Ensure the data volume directory on the host is owned by the same user you specify and it will "just work" <sup>TM</sup>.
|
||||
Sometimes when using data volumes (`-v` flags) permissions issues can arise between the host OS and the container. We avoid this issue by allowing you to specify the user `PUID` and group `PGID`. Ensure the data volume directory on the host is owned by the same user you specify and it will "just work" ™.
|
||||
|
||||
In this instance `PUID=1001` and `PGID=1001`. To find yours use `genent passwd` as below:
|
||||
In this instance `PUID=1001` and `PGID=1001`. To find yours use `id user` as below:
|
||||
|
||||
getent passwd | grep dockeruser
|
||||
dockeruser:x:1001:1001:,,,:/home/dockeruser
|
||||
```
|
||||
$ id <dockeruser>
|
||||
uid=1001(dockeruser) gid=1001(dockergroup) groups=1001(dockergroup)
|
||||
```
|
||||
|
||||
## Setting up the application
|
||||
|
||||
@ -49,13 +54,13 @@ You can find some of the best documentation available on the web at [docs.syncth
|
||||
|
||||
**Note: ** The Syncthing devs highly suggest setting a password for this container as it listens on 0.0.0.0. To do this go to `Actions -> Settings -> set user\password` for the webUI.
|
||||
|
||||
## Misc
|
||||
## Info
|
||||
|
||||
* Shell access whilst the container is running: `docker exec -it syncthing /bin/bash`
|
||||
* Upgrade to the latest version: `docker restart syncthing`
|
||||
* To monitor the logs of the container in realtime: `docker logs -f syncthing`
|
||||
|
||||
## Versions
|
||||
|
||||
+ **18.12.2015:** Initial testing / release (IronicBadger)
|
||||
+ **24.09.2015:** Inital dev complete (Lonix)
|
||||
+ **11.08.16:** Rebase to alpine linux.
|
||||
+ **18.12.15:** Initial testing / release (IronicBadger)
|
||||
+ **24.09.15:** Inital dev complete (Lonix)
|
||||
|
||||
8
root/etc/services.d/syncthing/run
Normal file
8
root/etc/services.d/syncthing/run
Normal file
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
umask 0000
|
||||
|
||||
exec \
|
||||
s6-setuidgid abc syncthing \
|
||||
-home=/config -no-browser -no-restart \
|
||||
--gui-address="0.0.0.0:8384"
|
||||
@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
umask 0000
|
||||
|
||||
exec /sbin/setuser abc syncthing -home=/config -no-browser -no-restart --gui-address="0.0.0.0:8384"
|
||||
Loading…
x
Reference in New Issue
Block a user