forked from caarlos0/speedtest-exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
alex
authored and
alex
committed
Jul 19, 2023
1 parent
13ac383
commit 94d08a8
Showing
1 changed file
with
7 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,22 @@ | ||
FROM debian:10-slim AS get-speedtest | ||
|
||
RUN apt-get update && apt-get install gnupg1 apt-transport-https dirmngr lsb-release -y | ||
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 379CE192D401AB61 | ||
RUN echo "deb https://ookla.bintray.com/debian $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/speedtest.list | ||
RUN apt-get update | ||
RUN apt-get install curl -y | ||
RUN curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh | bash | ||
RUN apt-get install speedtest | ||
|
||
FROM node:16.13-alpine as prod-stage | ||
FROM node:16.13-alpine AS prod-stage | ||
LABEL maintainer="contact@sjultra.com" | ||
|
||
COPY --from=get-speedtest /usr/bin/speedtest /usr/bin/speedtest | ||
|
||
WORKDIR /app | ||
|
||
# install depencies | ||
COPY package.json package-lock.json ./ | ||
COPY package.json package-lock.json . | ||
RUN npm ci | ||
|
||
# include speedtest cli in build | ||
COPY --from=get-speedtest /usr/bin/speedtest /usr/bin/speedtest | ||
|
||
# run script | ||
COPY . . | ||
CMD [ "node", "index.js" ] | ||
|