mirror of
https://github.com/linuxserver/docker-syncthing.git
synced 2026-02-19 20:04:00 +08:00
commit
02f774f37f
30
Dockerfile
30
Dockerfile
@ -2,8 +2,6 @@ FROM lsiobase/alpine:3.9 as buildstage
|
||||
|
||||
# build variables
|
||||
ARG SYNCTHING_RELEASE
|
||||
ARG SYNC_SRC="/tmp/syncthing"
|
||||
ARG SYNC_BUILD="$SYNC_SRC/src/github.com/syncthing/syncthing"
|
||||
|
||||
RUN \
|
||||
echo "**** install build packages ****" && \
|
||||
@ -11,6 +9,7 @@ RUN \
|
||||
curl \
|
||||
g++ \
|
||||
gcc \
|
||||
git \
|
||||
go \
|
||||
tar
|
||||
|
||||
@ -21,28 +20,19 @@ echo "**** fetch source code ****" && \
|
||||
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
|
||||
fi && \
|
||||
mkdir -p \
|
||||
"${SYNC_BUILD}" && \
|
||||
/tmp/sync && \
|
||||
curl -o \
|
||||
/tmp/syncthing-src.tar.gz -L \
|
||||
"https://github.com/syncthing/syncthing/archive/${SYNCTHING_RELEASE}.tar.gz" && \
|
||||
tar xf \
|
||||
/tmp/syncthing-src.tar.gz -C \
|
||||
"${SYNC_BUILD}" --strip-components=1 && \
|
||||
/tmp/sync --strip-components=1 && \
|
||||
echo "**** compile syncthing ****" && \
|
||||
cd "${SYNC_BUILD}" && \
|
||||
export GOPATH="${SYNC_SRC}" && \
|
||||
go run build.go -no-upgrade -version=${SYNCTHING_RELEASE} && \
|
||||
echo "**** install syncthing to tmp folder ****" && \
|
||||
mkdir -p \
|
||||
/tmp/bin && \
|
||||
install -D -m755 \
|
||||
$SYNC_BUILD/bin/syncthing \
|
||||
/tmp/bin/syncthing && \
|
||||
for i in $(ls $SYNC_BUILD/bin); \
|
||||
do if ! [ "$i" = "syncthing" ]; \
|
||||
then install -Dm 755 $SYNC_BUILD/bin/$i /tmp/bin/$i ; \
|
||||
fi; \
|
||||
done
|
||||
cd /tmp/sync && \
|
||||
CGO_ENABLED=0 go run build.go \
|
||||
-no-upgrade \
|
||||
-version=${SYNCTHING_RELEASE} \
|
||||
build syncthing
|
||||
|
||||
############## runtime stage ##############
|
||||
FROM lsiobase/alpine:3.9
|
||||
@ -51,7 +41,7 @@ FROM lsiobase/alpine:3.9
|
||||
ARG BUILD_DATE
|
||||
ARG VERSION
|
||||
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||||
LABEL maintainer="sparklyballs"
|
||||
LABEL maintainer="sparklyballs,thelamer"
|
||||
|
||||
# environment settings
|
||||
ENV HOME="/config"
|
||||
@ -62,7 +52,7 @@ RUN \
|
||||
/var/lib/syncthing
|
||||
|
||||
# copy files from build stage and local files
|
||||
COPY --from=buildstage /tmp/bin/ /usr/bin/
|
||||
COPY --from=buildstage /tmp/sync/syncthing /usr/bin/
|
||||
COPY root/ /
|
||||
|
||||
# ports and volumes
|
||||
|
||||
@ -2,8 +2,6 @@ FROM lsiobase/alpine.arm64:3.9 as buildstage
|
||||
|
||||
# build variables
|
||||
ARG SYNCTHING_RELEASE
|
||||
ARG SYNC_SRC="/tmp/syncthing"
|
||||
ARG SYNC_BUILD="$SYNC_SRC/src/github.com/syncthing/syncthing"
|
||||
|
||||
RUN \
|
||||
echo "**** install build packages ****" && \
|
||||
@ -11,6 +9,7 @@ RUN \
|
||||
curl \
|
||||
g++ \
|
||||
gcc \
|
||||
git \
|
||||
go \
|
||||
tar
|
||||
|
||||
@ -21,28 +20,19 @@ echo "**** fetch source code ****" && \
|
||||
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
|
||||
fi && \
|
||||
mkdir -p \
|
||||
"${SYNC_BUILD}" && \
|
||||
/tmp/sync && \
|
||||
curl -o \
|
||||
/tmp/syncthing-src.tar.gz -L \
|
||||
"https://github.com/syncthing/syncthing/archive/${SYNCTHING_RELEASE}.tar.gz" && \
|
||||
tar xf \
|
||||
/tmp/syncthing-src.tar.gz -C \
|
||||
"${SYNC_BUILD}" --strip-components=1 && \
|
||||
/tmp/sync --strip-components=1 && \
|
||||
echo "**** compile syncthing ****" && \
|
||||
cd "${SYNC_BUILD}" && \
|
||||
export GOPATH="${SYNC_SRC}" && \
|
||||
go run build.go -no-upgrade -version=${SYNCTHING_RELEASE} && \
|
||||
echo "**** install syncthing to tmp folder ****" && \
|
||||
mkdir -p \
|
||||
/tmp/bin && \
|
||||
install -D -m755 \
|
||||
$SYNC_BUILD/bin/syncthing \
|
||||
/tmp/bin/syncthing && \
|
||||
for i in $(ls $SYNC_BUILD/bin); \
|
||||
do if ! [ "$i" = "syncthing" ]; \
|
||||
then install -Dm 755 $SYNC_BUILD/bin/$i /tmp/bin/$i ; \
|
||||
fi; \
|
||||
done
|
||||
cd /tmp/sync && \
|
||||
CGO_ENABLED=0 go run build.go \
|
||||
-no-upgrade \
|
||||
-version=${SYNCTHING_RELEASE} \
|
||||
build syncthing
|
||||
|
||||
############## runtime stage ##############
|
||||
FROM lsiobase/alpine.arm64:3.9
|
||||
@ -54,7 +44,7 @@ COPY qemu-aarch64-static /usr/bin
|
||||
ARG BUILD_DATE
|
||||
ARG VERSION
|
||||
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||||
LABEL maintainer="sparklyballs"
|
||||
LABEL maintainer="sparklyballs,thelamer"
|
||||
|
||||
# environment settings
|
||||
ENV HOME="/config"
|
||||
@ -65,7 +55,7 @@ RUN \
|
||||
/var/lib/syncthing
|
||||
|
||||
# copy files from build stage and local files
|
||||
COPY --from=buildstage /tmp/bin/ /usr/bin/
|
||||
COPY --from=buildstage /tmp/sync/syncthing /usr/bin/
|
||||
COPY root/ /
|
||||
|
||||
# ports and volumes
|
||||
|
||||
@ -2,8 +2,6 @@ FROM lsiobase/alpine.armhf:3.9 as buildstage
|
||||
|
||||
# build variables
|
||||
ARG SYNCTHING_RELEASE
|
||||
ARG SYNC_SRC="/tmp/syncthing"
|
||||
ARG SYNC_BUILD="$SYNC_SRC/src/github.com/syncthing/syncthing"
|
||||
|
||||
RUN \
|
||||
echo "**** install build packages ****" && \
|
||||
@ -11,6 +9,7 @@ RUN \
|
||||
curl \
|
||||
g++ \
|
||||
gcc \
|
||||
git \
|
||||
go \
|
||||
tar
|
||||
|
||||
@ -21,28 +20,19 @@ echo "**** fetch source code ****" && \
|
||||
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
|
||||
fi && \
|
||||
mkdir -p \
|
||||
"${SYNC_BUILD}" && \
|
||||
/tmp/sync && \
|
||||
curl -o \
|
||||
/tmp/syncthing-src.tar.gz -L \
|
||||
"https://github.com/syncthing/syncthing/archive/${SYNCTHING_RELEASE}.tar.gz" && \
|
||||
tar xf \
|
||||
/tmp/syncthing-src.tar.gz -C \
|
||||
"${SYNC_BUILD}" --strip-components=1 && \
|
||||
/tmp/sync --strip-components=1 && \
|
||||
echo "**** compile syncthing ****" && \
|
||||
cd "${SYNC_BUILD}" && \
|
||||
export GOPATH="${SYNC_SRC}" && \
|
||||
go run build.go -no-upgrade -version=${SYNCTHING_RELEASE} && \
|
||||
echo "**** install syncthing to tmp folder ****" && \
|
||||
mkdir -p \
|
||||
/tmp/bin && \
|
||||
install -D -m755 \
|
||||
$SYNC_BUILD/bin/syncthing \
|
||||
/tmp/bin/syncthing && \
|
||||
for i in $(ls $SYNC_BUILD/bin); \
|
||||
do if ! [ "$i" = "syncthing" ]; \
|
||||
then install -Dm 755 $SYNC_BUILD/bin/$i /tmp/bin/$i ; \
|
||||
fi; \
|
||||
done
|
||||
cd /tmp/sync && \
|
||||
CGO_ENABLED=0 go run build.go \
|
||||
-no-upgrade \
|
||||
-version=${SYNCTHING_RELEASE} \
|
||||
build syncthing
|
||||
|
||||
############## runtime stage ##############
|
||||
FROM lsiobase/alpine.armhf:3.9
|
||||
@ -54,7 +44,7 @@ COPY qemu-arm-static /usr/bin
|
||||
ARG BUILD_DATE
|
||||
ARG VERSION
|
||||
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||||
LABEL maintainer="sparklyballs"
|
||||
LABEL maintainer="sparklyballs,thelamer"
|
||||
|
||||
# environment settings
|
||||
ENV HOME="/config"
|
||||
@ -65,7 +55,7 @@ RUN \
|
||||
/var/lib/syncthing
|
||||
|
||||
# copy files from build stage and local files
|
||||
COPY --from=buildstage /tmp/bin/ /usr/bin/
|
||||
COPY --from=buildstage /tmp/sync/syncthing /usr/bin/
|
||||
COPY root/ /
|
||||
|
||||
# ports and volumes
|
||||
|
||||
@ -57,7 +57,7 @@ docker create \
|
||||
-e UMASK_SET=<022> \
|
||||
-p 8384:8384 \
|
||||
-p 22000:22000 \
|
||||
-p 21027/udp:21027/udp \
|
||||
-p 21027:21027/udp \
|
||||
-v </path/to/appdata/config>:/config \
|
||||
-v </path/to/data1>:/data1 \
|
||||
-v </path/to/data2>:/data2 \
|
||||
@ -89,7 +89,7 @@ services:
|
||||
ports:
|
||||
- 8384:8384
|
||||
- 22000:22000
|
||||
- 21027/udp:21027/udp
|
||||
- 21027:21027/udp
|
||||
restart: unless-stopped
|
||||
```
|
||||
|
||||
@ -171,6 +171,7 @@ Below are the instructions for updating containers:
|
||||
|
||||
## Versions
|
||||
|
||||
* **05.03.19:** - Update Build process for v1.1.0 release.
|
||||
* **22.02.19:** - Rebasing to alpine 3.9.
|
||||
* **16.01.19:** - Add pipeline logic and multi arch.
|
||||
* **30.07.18:** - Rebase to alpine 3.8 and use buildstage.
|
||||
|
||||
@ -29,7 +29,7 @@ param_usage_include_ports: true
|
||||
param_ports:
|
||||
- { external_port: "8384", internal_port: "8384", port_desc: "Application WebUI" }
|
||||
- { external_port: "22000", internal_port: "22000", port_desc: "Listening port" }
|
||||
- { external_port: "21027/udp", internal_port: "21027/udp", port_desc: "Protocol discovery" }
|
||||
- { external_port: "21027", internal_port: "21027/udp", port_desc: "Protocol discovery" }
|
||||
|
||||
# application setup block
|
||||
app_setup_block_enabled: true
|
||||
@ -40,6 +40,7 @@ app_setup_nginx_reverse_proxy_block: ""
|
||||
# changelog
|
||||
|
||||
changelogs:
|
||||
- { date: "05.03.19:", desc: "Update Build process for v1.1.0 release." }
|
||||
- { date: "22.02.19:", desc: "Rebasing to alpine 3.9." }
|
||||
- { date: "16.01.19:", desc: "Add pipeline logic and multi arch." }
|
||||
- { date: "30.07.18:", desc: "Rebase to alpine 3.8 and use buildstage." }
|
||||
@ -55,4 +56,4 @@ changelogs:
|
||||
- { date: "28.08.16:", desc: "Add badges to README." }
|
||||
- { date: "11.08.16:", desc: "Rebase to alpine linux." }
|
||||
- { date: "18.12.15:", desc: "Initial testing / release (IronicBadger)" }
|
||||
- { date: "24.09.15:", desc: "Inital dev complete (Lonix)" }
|
||||
- { date: "24.09.15:", desc: "Inital dev complete (Lonix)" }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user