Skip to content

Commit

Permalink
patch dockerfile
Browse files Browse the repository at this point in the history
  • 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.
15 changes: 7 additions & 8 deletions docker/speedtest/Dockerfile
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" ]

0 comments on commit 94d08a8

Please sign in to comment.