Skip to content

Commit 02f774f

Browse files
authored
Merge pull request #27 from thelamer/master
Build changes for v1.1.0
2 parents c2544b0 + e943932 commit 02f774f

File tree

5 files changed

+36
-64
lines changed

5 files changed

+36
-64
lines changed

Dockerfile

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@ FROM lsiobase/alpine:3.9 as buildstage
22

33
# build variables
44
ARG SYNCTHING_RELEASE
5-
ARG SYNC_SRC="/tmp/syncthing"
6-
ARG SYNC_BUILD="$SYNC_SRC/src/github.com/syncthing/syncthing"
75

86
RUN \
97
echo "**** install build packages ****" && \
108
apk add --no-cache \
119
curl \
1210
g++ \
1311
gcc \
12+
git \
1413
go \
1514
tar
1615

@@ -21,28 +20,19 @@ echo "**** fetch source code ****" && \
2120
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
2221
fi && \
2322
mkdir -p \
24-
"${SYNC_BUILD}" && \
23+
/tmp/sync && \
2524
curl -o \
2625
/tmp/syncthing-src.tar.gz -L \
2726
"https://github.com/syncthing/syncthing/archive/${SYNCTHING_RELEASE}.tar.gz" && \
2827
tar xf \
2928
/tmp/syncthing-src.tar.gz -C \
30-
"${SYNC_BUILD}" --strip-components=1 && \
29+
/tmp/sync --strip-components=1 && \
3130
echo "**** compile syncthing ****" && \
32-
cd "${SYNC_BUILD}" && \
33-
export GOPATH="${SYNC_SRC}" && \
34-
go run build.go -no-upgrade -version=${SYNCTHING_RELEASE} && \
35-
echo "**** install syncthing to tmp folder ****" && \
36-
mkdir -p \
37-
/tmp/bin && \
38-
install -D -m755 \
39-
$SYNC_BUILD/bin/syncthing \
40-
/tmp/bin/syncthing && \
41-
for i in $(ls $SYNC_BUILD/bin); \
42-
do if ! [ "$i" = "syncthing" ]; \
43-
then install -Dm 755 $SYNC_BUILD/bin/$i /tmp/bin/$i ; \
44-
fi; \
45-
done
31+
cd /tmp/sync && \
32+
CGO_ENABLED=0 go run build.go \
33+
-no-upgrade \
34+
-version=${SYNCTHING_RELEASE} \
35+
build syncthing
4636

4737
############## runtime stage ##############
4838
FROM lsiobase/alpine:3.9
@@ -51,7 +41,7 @@ FROM lsiobase/alpine:3.9
5141
ARG BUILD_DATE
5242
ARG VERSION
5343
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
54-
LABEL maintainer="sparklyballs"
44+
LABEL maintainer="sparklyballs,thelamer"
5545

5646
# environment settings
5747
ENV HOME="/config"
@@ -62,7 +52,7 @@ RUN \
6252
/var/lib/syncthing
6353

6454
# copy files from build stage and local files
65-
COPY --from=buildstage /tmp/bin/ /usr/bin/
55+
COPY --from=buildstage /tmp/sync/syncthing /usr/bin/
6656
COPY root/ /
6757

6858
# ports and volumes

Dockerfile.aarch64

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@ FROM lsiobase/alpine.arm64:3.9 as buildstage
22

33
# build variables
44
ARG SYNCTHING_RELEASE
5-
ARG SYNC_SRC="/tmp/syncthing"
6-
ARG SYNC_BUILD="$SYNC_SRC/src/github.com/syncthing/syncthing"
75

86
RUN \
97
echo "**** install build packages ****" && \
108
apk add --no-cache \
119
curl \
1210
g++ \
1311
gcc \
12+
git \
1413
go \
1514
tar
1615

@@ -21,28 +20,19 @@ echo "**** fetch source code ****" && \
2120
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
2221
fi && \
2322
mkdir -p \
24-
"${SYNC_BUILD}" && \
23+
/tmp/sync && \
2524
curl -o \
2625
/tmp/syncthing-src.tar.gz -L \
2726
"https://github.com/syncthing/syncthing/archive/${SYNCTHING_RELEASE}.tar.gz" && \
2827
tar xf \
2928
/tmp/syncthing-src.tar.gz -C \
30-
"${SYNC_BUILD}" --strip-components=1 && \
29+
/tmp/sync --strip-components=1 && \
3130
echo "**** compile syncthing ****" && \
32-
cd "${SYNC_BUILD}" && \
33-
export GOPATH="${SYNC_SRC}" && \
34-
go run build.go -no-upgrade -version=${SYNCTHING_RELEASE} && \
35-
echo "**** install syncthing to tmp folder ****" && \
36-
mkdir -p \
37-
/tmp/bin && \
38-
install -D -m755 \
39-
$SYNC_BUILD/bin/syncthing \
40-
/tmp/bin/syncthing && \
41-
for i in $(ls $SYNC_BUILD/bin); \
42-
do if ! [ "$i" = "syncthing" ]; \
43-
then install -Dm 755 $SYNC_BUILD/bin/$i /tmp/bin/$i ; \
44-
fi; \
45-
done
31+
cd /tmp/sync && \
32+
CGO_ENABLED=0 go run build.go \
33+
-no-upgrade \
34+
-version=${SYNCTHING_RELEASE} \
35+
build syncthing
4636

4737
############## runtime stage ##############
4838
FROM lsiobase/alpine.arm64:3.9
@@ -54,7 +44,7 @@ COPY qemu-aarch64-static /usr/bin
5444
ARG BUILD_DATE
5545
ARG VERSION
5646
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
57-
LABEL maintainer="sparklyballs"
47+
LABEL maintainer="sparklyballs,thelamer"
5848

5949
# environment settings
6050
ENV HOME="/config"
@@ -65,7 +55,7 @@ RUN \
6555
/var/lib/syncthing
6656

6757
# copy files from build stage and local files
68-
COPY --from=buildstage /tmp/bin/ /usr/bin/
58+
COPY --from=buildstage /tmp/sync/syncthing /usr/bin/
6959
COPY root/ /
7060

7161
# ports and volumes

Dockerfile.armhf

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@ FROM lsiobase/alpine.armhf:3.9 as buildstage
22

33
# build variables
44
ARG SYNCTHING_RELEASE
5-
ARG SYNC_SRC="/tmp/syncthing"
6-
ARG SYNC_BUILD="$SYNC_SRC/src/github.com/syncthing/syncthing"
75

86
RUN \
97
echo "**** install build packages ****" && \
108
apk add --no-cache \
119
curl \
1210
g++ \
1311
gcc \
12+
git \
1413
go \
1514
tar
1615

@@ -21,28 +20,19 @@ echo "**** fetch source code ****" && \
2120
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
2221
fi && \
2322
mkdir -p \
24-
"${SYNC_BUILD}" && \
23+
/tmp/sync && \
2524
curl -o \
2625
/tmp/syncthing-src.tar.gz -L \
2726
"https://github.com/syncthing/syncthing/archive/${SYNCTHING_RELEASE}.tar.gz" && \
2827
tar xf \
2928
/tmp/syncthing-src.tar.gz -C \
30-
"${SYNC_BUILD}" --strip-components=1 && \
29+
/tmp/sync --strip-components=1 && \
3130
echo "**** compile syncthing ****" && \
32-
cd "${SYNC_BUILD}" && \
33-
export GOPATH="${SYNC_SRC}" && \
34-
go run build.go -no-upgrade -version=${SYNCTHING_RELEASE} && \
35-
echo "**** install syncthing to tmp folder ****" && \
36-
mkdir -p \
37-
/tmp/bin && \
38-
install -D -m755 \
39-
$SYNC_BUILD/bin/syncthing \
40-
/tmp/bin/syncthing && \
41-
for i in $(ls $SYNC_BUILD/bin); \
42-
do if ! [ "$i" = "syncthing" ]; \
43-
then install -Dm 755 $SYNC_BUILD/bin/$i /tmp/bin/$i ; \
44-
fi; \
45-
done
31+
cd /tmp/sync && \
32+
CGO_ENABLED=0 go run build.go \
33+
-no-upgrade \
34+
-version=${SYNCTHING_RELEASE} \
35+
build syncthing
4636

4737
############## runtime stage ##############
4838
FROM lsiobase/alpine.armhf:3.9
@@ -54,7 +44,7 @@ COPY qemu-arm-static /usr/bin
5444
ARG BUILD_DATE
5545
ARG VERSION
5646
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
57-
LABEL maintainer="sparklyballs"
47+
LABEL maintainer="sparklyballs,thelamer"
5848

5949
# environment settings
6050
ENV HOME="/config"
@@ -65,7 +55,7 @@ RUN \
6555
/var/lib/syncthing
6656

6757
# copy files from build stage and local files
68-
COPY --from=buildstage /tmp/bin/ /usr/bin/
58+
COPY --from=buildstage /tmp/sync/syncthing /usr/bin/
6959
COPY root/ /
7060

7161
# ports and volumes

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ docker create \
5757
-e UMASK_SET=<022> \
5858
-p 8384:8384 \
5959
-p 22000:22000 \
60-
-p 21027/udp:21027/udp \
60+
-p 21027:21027/udp \
6161
-v </path/to/appdata/config>:/config \
6262
-v </path/to/data1>:/data1 \
6363
-v </path/to/data2>:/data2 \
@@ -89,7 +89,7 @@ services:
8989
ports:
9090
- 8384:8384
9191
- 22000:22000
92-
- 21027/udp:21027/udp
92+
- 21027:21027/udp
9393
restart: unless-stopped
9494
```
9595

@@ -171,6 +171,7 @@ Below are the instructions for updating containers:
171171

172172
## Versions
173173

174+
* **05.03.19:** - Update Build process for v1.1.0 release.
174175
* **22.02.19:** - Rebasing to alpine 3.9.
175176
* **16.01.19:** - Add pipeline logic and multi arch.
176177
* **30.07.18:** - Rebase to alpine 3.8 and use buildstage.

readme-vars.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ param_usage_include_ports: true
2929
param_ports:
3030
- { external_port: "8384", internal_port: "8384", port_desc: "Application WebUI" }
3131
- { external_port: "22000", internal_port: "22000", port_desc: "Listening port" }
32-
- { external_port: "21027/udp", internal_port: "21027/udp", port_desc: "Protocol discovery" }
32+
- { external_port: "21027", internal_port: "21027/udp", port_desc: "Protocol discovery" }
3333

3434
# application setup block
3535
app_setup_block_enabled: true
@@ -40,6 +40,7 @@ app_setup_nginx_reverse_proxy_block: ""
4040
# changelog
4141

4242
changelogs:
43+
- { date: "05.03.19:", desc: "Update Build process for v1.1.0 release." }
4344
- { date: "22.02.19:", desc: "Rebasing to alpine 3.9." }
4445
- { date: "16.01.19:", desc: "Add pipeline logic and multi arch." }
4546
- { date: "30.07.18:", desc: "Rebase to alpine 3.8 and use buildstage." }
@@ -55,4 +56,4 @@ changelogs:
5556
- { date: "28.08.16:", desc: "Add badges to README." }
5657
- { date: "11.08.16:", desc: "Rebase to alpine linux." }
5758
- { date: "18.12.15:", desc: "Initial testing / release (IronicBadger)" }
58-
- { date: "24.09.15:", desc: "Inital dev complete (Lonix)" }
59+
- { date: "24.09.15:", desc: "Inital dev complete (Lonix)" }

0 commit comments

Comments
 (0)