From 3a93cdca3bae418a5de9ea7009a475c3edde7655 Mon Sep 17 00:00:00 2001 From: Fabien BOURGEOIS Date: Sun, 10 Mar 2019 15:09:14 +0100 Subject: [PATCH] [FIX]Syncthing new dockerfile to be adapted --- syncthing/Dockerfile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/syncthing/Dockerfile b/syncthing/Dockerfile index 3009e45..2547e30 100644 --- a/syncthing/Dockerfile +++ b/syncthing/Dockerfile @@ -1,13 +1,16 @@ FROM golang:1.11 AS builder MAINTAINER Yaltik - Fabien Bourgeois -WORKDIR /src -COPY . . +ENV VERSION v1.1.0 + +RUN mkdir -p /usr/local/go/src/github.com/syncthing/syncthing +WORKDIR /usr/local/go/src/github.com/syncthing/syncthing +RUN git clone --branch "${VERSION}" --depth 1 https://github.com/syncthing/syncthing . ENV CGO_ENABLED=0 ENV BUILD_HOST=syncthing.net ENV BUILD_USER=docker -RUN rm -f syncthing && go run build.go -no-upgrade build syncthing +RUN rm -f syncthing && go run build.go FROM alpine @@ -17,7 +20,7 @@ VOLUME ["/var/syncthing"] RUN apk add --no-cache ca-certificates su-exec -COPY --from=builder /src/syncthing /bin/syncthing +COPY --from=builder /usr/local/go/src/github.com/syncthing/syncthing/bin/syncthing /bin/syncthing ENV PUID=1000 PGID=1000