Skip to content

Commit

Permalink
Avoid running speedtest while accepting license in build
Browse files Browse the repository at this point in the history
speedtest/Dockerfile
  • Loading branch information
crazyuploader committed Sep 24, 2024
1 parent c976144 commit a6269c9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions speedtest/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@ FROM alpine:3.18 AS runner
# Copy Speedtest CLI binary to /usr/bin
COPY --from=builder /usr/bin/speedtest /usr/bin/speedtest

# Accept License Agreement & GDPR License
RUN /usr/bin/speedtest \
--accept-license \
--accept-gdpr
# Accept License Agreement & GDPR License with a timeout
RUN ( /usr/bin/speedtest --accept-license --accept-gdpr & sleep 2 && kill $! ) || true

# Ensure the ENTRYPOINT includes license acceptance
ENTRYPOINT ["/usr/bin/speedtest", "--accept-license", "--accept-gdpr"]

0 comments on commit a6269c9

Please sign in to comment.