mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-22 02:48:59 +00:00
wip
This commit is contained in:
parent
a241e3cb90
commit
547eb16b8d
2
.github/workflows/build-syncthing.yaml
vendored
2
.github/workflows/build-syncthing.yaml
vendored
@ -649,7 +649,7 @@ jobs:
|
||||
- name: Build binaries
|
||||
run: |
|
||||
for arch in arm64 amd64; do
|
||||
go run build.go -goarch "$arch" build syncthing
|
||||
go run build.go -goos linux -goarch "$arch" build syncthing
|
||||
mv syncthing syncthing-linux-"$arch"
|
||||
done
|
||||
env:
|
||||
|
@ -1,5 +1,4 @@
|
||||
ARG GOVERSION=latest
|
||||
ARG TARGETARCH
|
||||
|
||||
#
|
||||
# Maybe build Syncthing. This is a bit ugly as we can't make an entire
|
||||
@ -11,15 +10,18 @@ ARG TARGETARCH
|
||||
FROM golang:$GOVERSION AS builder
|
||||
ARG BUILD_USER
|
||||
ARG BUILD_HOST
|
||||
ARG TARGETARCH
|
||||
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
|
||||
ENV CGO_ENABLED=0
|
||||
RUN echo syncthing-linux-$TARGETARCH
|
||||
RUN if [ ! -f syncthing-linux-$TARGETARCH ] ; then \
|
||||
echo syncthing-linux-$TARGETARCH ; \
|
||||
go run build.go -no-upgrade build syncthing ; \
|
||||
fi && \
|
||||
mv syncthing syncthing-linux-$TARGETARCH
|
||||
mv syncthing syncthing-linux-$TARGETARCH ; \
|
||||
fi
|
||||
|
||||
#
|
||||
# The rest of the Dockerfile uses the binary from the builder, prebuilt or
|
||||
@ -27,6 +29,7 @@ RUN if [ ! -f syncthing-linux-$TARGETARCH ] ; then \
|
||||
#
|
||||
|
||||
FROM alpine
|
||||
ARG TARGETARCH
|
||||
|
||||
EXPOSE 8384 22000/tcp 22000/udp 21027/udp
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user