| 12345678910111213141516171819202122232425 |
- ARG GOVERSION=latest
- FROM golang:$GOVERSION AS builder
- WORKDIR /src
- COPY . .
- ENV CGO_ENABLED=0
- ENV GO111MODULE=on
- ENV GOOS=linux
- ENV GOARCH=amd64
- RUN rm -f freepbx-tftp-server && go build -a -tags netgo -ldflags '-w -extldflags "-static"' -o freepbx-tftp-server main.go
- FROM scratch
- EXPOSE 69/udp
- VOLUME ["/tftpboot"]
- COPY --from=builder /src/freepbx-tftp-server /freepbx-tftp-server
- #COPY --from=builder /src/script/docker-entrypoint.sh /bin/entrypoint.sh
- ENV HOME=/tftpboot
- CMD ["/freepbx-tftp-server"]
- #ENTRYPOINT ["/bin/entrypoint.sh", "/bin/syncthing", "-home", "/var/syncthing/config"]
|