-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.alpine
34 lines (31 loc) · 995 Bytes
/
Dockerfile.alpine
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
FROM alpine:3.13.2
ARG VERSION
RUN apk update && \
# install requirements
apk add --no-cache --virtual .build-deps \
ca-certificates \
make \
wget \
git \
curl \
go \
musl-dev && \
# update certs
update-ca-certificates && \
# get latest stable version
LATEST_VERSION=$(curl https://api.github.com/repos/GoMetric/statsd-http-proxy/releases/latest 2>/dev/null | grep tag_name | awk -F'"' '{print $4}') && \
VERSION=${VERSION:-$LATEST_VERSION} && \
# download source
git clone https://github.com/GoMetric/statsd-http-proxy && \
cd statsd-http-proxy && \
git checkout ${VERSION} && \
# make and install source
make build && \
chmod +x ./bin/statsd-http-proxy && \
mv ./bin/statsd-http-proxy /usr/local/bin && \
# clear
cd .. && rm -rf statsd-http-proxy && \
apk del .build-deps
# start service
EXPOSE 80
ENTRYPOINT ["/usr/local/bin/statsd-http-proxy", "--http-host="]