forked from jyrkih/docker-speedtest-influxdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
arm32v6.dockerfile
47 lines (37 loc) · 1.33 KB
/
arm32v6.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
41
42
43
44
45
46
47
FROM arm32v6/golang:alpine AS build-env
# Set go bin which doesn't appear to be set already.
ENV GOBIN /go/bin
RUN apk update && apk upgrade && \
apk add --no-cache bash git openssh
# Add QEMU
# Download QEMU, see https://github.com/docker/hub-feedback/issues/1261
ENV QEMU_URL https://github.com/balena-io/qemu/releases/download/v3.0.0%2Bresin/qemu-3.0.0+resin-arm.tar.gz
RUN apk add curl && curl -L ${QEMU_URL} | tar zxvf - -C /usr/bin --strip-components 1
# build directories
ADD . /go/src/quadstingray/speedtest-influxdb
WORKDIR /go/src/quadstingray/speedtest-influxdb
# Go dep!
RUN go get -u github.com/golang/dep/...
RUN dep ensure
# Build my app
RUN go build -o speedtestInfluxDB *.go
# final stage
FROM --platform=linux/arm/v6 alpine
WORKDIR /app
MAINTAINER QuadStingray <docker-speedtest@quadstingray.com>
ENV INTERVAL=3600 \
INFLUXDB_USE="true" \
INFLUXDB_DB="speedtest" \
INFLUXDB_URL="http://influxdb:8086" \
INFLUXDB_USER="DEFAULT" \
INFLUXDB_PWD="DEFAULT" \
HOST="local" \
SPEEDTEST_SERVER="" \
SPEEDTEST_LIST_SERVERS="false" \
SPEEDTEST_LIST_KEEP_CONTAINER_RUNNING="false" \
SPEEDTEST_ALGO_TYPE="max" \
SHOW_EXTERNAL_IP="false"
RUN apk add ca-certificates
COPY --from=build-env /go/src/quadstingray/speedtest-influxdb/speedtestInfluxDB /app/speedtestInfluxDB
ADD run.sh run.sh
CMD sh run.sh