mirror of
https://github.com/linuxserver/docker-syncthing.git
synced 2026-02-19 20:04:00 +08:00
Merge pull request #14 from linuxserver/build_fix
simplify build structure due to failing symlinks
This commit is contained in:
commit
2a8e4fc3bd
32
Dockerfile
32
Dockerfile
@ -7,11 +7,9 @@ ARG VERSION
|
||||
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||||
|
||||
# environment settings
|
||||
ENV HOME="/config"
|
||||
|
||||
# set build and source folders
|
||||
ARG SYNC_SRC="/tmp/syncthing"
|
||||
ARG SYNC_BUILD="$SYNC_SRC/src/github.com/syncthing"
|
||||
ARG SYNC_BUILD="$SYNC_SRC/src/github.com/syncthing/syncthing"
|
||||
ENV HOME="/config"
|
||||
|
||||
# install build packages
|
||||
RUN \
|
||||
@ -23,36 +21,34 @@ RUN \
|
||||
tar && \
|
||||
|
||||
# compile syncthing
|
||||
mkdir -p \
|
||||
"${SYNC_BUILD}" && \
|
||||
export GOPATH="${SYNC_SRC}" && \
|
||||
SYNC_TAG=$(curl -sX GET "https://api.github.com/repos/syncthing/syncthing/releases/latest" \
|
||||
| awk '/tag_name/{print $4;exit}' FS='[""]') && \
|
||||
mkdir -p \
|
||||
"${SYNC_BUILD}" \
|
||||
"${SYNC_SRC}" && \
|
||||
curl -o \
|
||||
/tmp/syncthing.tar.gz -L \
|
||||
/tmp/syncthing-src.tar.gz -L \
|
||||
"https://github.com/syncthing/syncthing/archive/${SYNC_TAG}.tar.gz" && \
|
||||
tar xf \
|
||||
/tmp/syncthing.tar.gz -C \
|
||||
"${SYNC_SRC}" --strip-components=1 && \
|
||||
ln -s "$SYNC_SRC" "$SYNC_BUILD/syncthing" && \
|
||||
cd "$SYNC_BUILD"/syncthing && \
|
||||
export GOPATH="${SYNC_SRC}" && \
|
||||
/tmp/syncthing-src.tar.gz -C \
|
||||
"${SYNC_BUILD}" --strip-components=1 && \
|
||||
cd "${SYNC_BUILD}" && \
|
||||
go run build.go -no-upgrade -version=${SYNC_TAG} && \
|
||||
|
||||
# install syncthing
|
||||
# install syncthing
|
||||
install -d -o abc -g abc \
|
||||
/var/lib/syncthing && \
|
||||
install -D -m755 \
|
||||
$SYNC_BUILD/syncthing/bin/syncthing \
|
||||
$SYNC_BUILD/bin/syncthing \
|
||||
/usr/bin/syncthing && \
|
||||
for i in $(ls $SYNC_BUILD/syncthing/bin); \
|
||||
for i in $(ls $SYNC_BUILD/bin); \
|
||||
do if ! [ "$i" = "syncthing" ]; \
|
||||
then install -Dm 755 $SYNC_BUILD/syncthing/bin/$i /usr/bin/$i ; \
|
||||
then install -Dm 755 $SYNC_BUILD/bin/$i /usr/bin/$i ; \
|
||||
fi; \
|
||||
done && \
|
||||
export GOPATH="" && \
|
||||
|
||||
# cleanup
|
||||
# cleanup
|
||||
apk del --purge \
|
||||
build-dependencies && \
|
||||
rm -rf \
|
||||
|
||||
@ -83,6 +83,7 @@ You can find some of the best documentation available on the web at [docs.syncth
|
||||
|
||||
## Versions
|
||||
|
||||
+ **29.07.17:** Simplify build structure as symlinks failing on > 0.14.32
|
||||
+ **28.05.17:** Rebase to alpine 3.6.
|
||||
+ **08.02.17:** Rebase to alpine 3.5.
|
||||
+ **01.11.16:** Switch to compiling latest version from git source.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user