Skip to content

Commit 2a8e4fc

Browse files
authored
Merge pull request #14 from linuxserver/build_fix
simplify build structure due to failing symlinks
2 parents d88bca8 + ecf1703 commit 2a8e4fc

File tree

2 files changed

+15
-18
lines changed

2 files changed

+15
-18
lines changed

Dockerfile

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@ ARG VERSION
77
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
88

99
# environment settings
10-
ENV HOME="/config"
11-
12-
# set build and source folders
1310
ARG SYNC_SRC="/tmp/syncthing"
14-
ARG SYNC_BUILD="$SYNC_SRC/src/github.com/syncthing"
11+
ARG SYNC_BUILD="$SYNC_SRC/src/github.com/syncthing/syncthing"
12+
ENV HOME="/config"
1513

1614
# install build packages
1715
RUN \
@@ -23,36 +21,34 @@ RUN \
2321
tar && \
2422

2523
# compile syncthing
24+
mkdir -p \
25+
"${SYNC_BUILD}" && \
26+
export GOPATH="${SYNC_SRC}" && \
2627
SYNC_TAG=$(curl -sX GET "https://api.github.com/repos/syncthing/syncthing/releases/latest" \
2728
| awk '/tag_name/{print $4;exit}' FS='[""]') && \
28-
mkdir -p \
29-
"${SYNC_BUILD}" \
30-
"${SYNC_SRC}" && \
3129
curl -o \
32-
/tmp/syncthing.tar.gz -L \
30+
/tmp/syncthing-src.tar.gz -L \
3331
"https://github.com/syncthing/syncthing/archive/${SYNC_TAG}.tar.gz" && \
3432
tar xf \
35-
/tmp/syncthing.tar.gz -C \
36-
"${SYNC_SRC}" --strip-components=1 && \
37-
ln -s "$SYNC_SRC" "$SYNC_BUILD/syncthing" && \
38-
cd "$SYNC_BUILD"/syncthing && \
39-
export GOPATH="${SYNC_SRC}" && \
33+
/tmp/syncthing-src.tar.gz -C \
34+
"${SYNC_BUILD}" --strip-components=1 && \
35+
cd "${SYNC_BUILD}" && \
4036
go run build.go -no-upgrade -version=${SYNC_TAG} && \
4137

42-
# install syncthing
38+
# install syncthing
4339
install -d -o abc -g abc \
4440
/var/lib/syncthing && \
4541
install -D -m755 \
46-
$SYNC_BUILD/syncthing/bin/syncthing \
42+
$SYNC_BUILD/bin/syncthing \
4743
/usr/bin/syncthing && \
48-
for i in $(ls $SYNC_BUILD/syncthing/bin); \
44+
for i in $(ls $SYNC_BUILD/bin); \
4945
do if ! [ "$i" = "syncthing" ]; \
50-
then install -Dm 755 $SYNC_BUILD/syncthing/bin/$i /usr/bin/$i ; \
46+
then install -Dm 755 $SYNC_BUILD/bin/$i /usr/bin/$i ; \
5147
fi; \
5248
done && \
5349
export GOPATH="" && \
5450

55-
# cleanup
51+
# cleanup
5652
apk del --purge \
5753
build-dependencies && \
5854
rm -rf \

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ You can find some of the best documentation available on the web at [docs.syncth
8383

8484
## Versions
8585

86+
+ **29.07.17:** Simplify build structure as symlinks failing on > 0.14.32
8687
+ **28.05.17:** Rebase to alpine 3.6.
8788
+ **08.02.17:** Rebase to alpine 3.5.
8889
+ **01.11.16:** Switch to compiling latest version from git source.

0 commit comments

Comments
 (0)