-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
40 lines (33 loc) · 1.51 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM alpine:latest
# Define an optional build argument to invalidate cache
ARG CACHEBUST=1
ARG VERSION
LABEL org.opencontainers.image.title="SpeedTest-Ookla"
LABEL org.opencontainers.image.version=${VERSION}
LABEL org.opencontainers.image.description="SpeedTest-Ookla - Internet connection measurement for developers"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.source="https://github.com/lferrarotti74/SpeedTest-Ookla"
ENV ENV="/etc/profile"
RUN apk --no-cache update && apk --no-cache upgrade && apk --update --no-cache --virtual .deps add tar curl && \
ARCH=$(apk info --print-arch) && \
case "$ARCH" in \
x86) _arch=i386 ;; \
x86_64) _arch=x86_64 ;; \
arm64) _arch=aarch64 ;; \
armv7) _arch=armhf ;; \
*) _arch="$ARCH" ;; \
esac && \
cd /tmp && \
curl -sSL https://install.speedtest.net/app/cli/ookla-speedtest-${VERSION}-linux-${_arch}.tgz | tar xz && \
mv /tmp/speedtest /usr/local/bin/ && \
rm -rf /tmp/speedtest.* && \
speedtest --accept-license --accept-gdpr && \
echo "alias vi='vim'" > ~/.profile && \
echo "alias l='ls -alF'" >> ~/.profile && \
echo "alias ls='ls -alF --color=auto'" >> ~/.profile && \
echo "alias speedtest='/usr/local/bin/speedtest --accept-license --accept-gdpr'" >> ~/.profile && \
rm -rf /var/cache/apk/* && \
apk del .deps
# Add copy script and/or files from local to base image
COPY scripts/aliases.sh /etc/profile.d/aliases.sh
CMD ["/bin/sh", "-l"]