Skip to content
This repository was archived by the owner on Jan 21, 2019. It is now read-only.

Commit 48b37ba

Browse files
committed
dockerfiles
1 parent 976a184 commit 48b37ba

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Dockerfile.alpine

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
FROM alpine:3.6
22

3+
ARG VERSION
4+
35
RUN apk update && \
46
# install requirements
57
apk add --no-cache --virtual .build-deps \
@@ -13,7 +15,8 @@ RUN apk update && \
1315
# update certs
1416
update-ca-certificates && \
1517
# get latest stable version
16-
VERSION=$(curl https://api.github.com/repos/sokil/statsd-http-proxy/releases/latest 2>/dev/null | grep tag_name | awk -F'"' '{print $4}') && \
18+
LATEST_VERSION=$(curl https://api.github.com/repos/sokil/statsd-http-proxy/releases/latest 2>/dev/null | grep tag_name | awk -F'"' '{print $4}') && \
19+
VERSION=${VERSION:-$LATEST_VERSION} && \
1720
# download source
1821
wget https://github.com/sokil/statsd-http-proxy/archive/$VERSION.tar.gz && \
1922
tar -zxvf ${VERSION}.tar.gz && \

Dockerfile.ubuntu

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
FROM ubuntu:17.10
22

3+
ARG VERSION
4+
35
RUN \
46
# install requirements
57
apt-get update && \
68
APT_PACKAGES="ca-certificates make git wget curl golang" && \
79
apt-get install -y --no-install-recommends ${APT_PACKAGES} && \
810
# get latest stable version
9-
VERSION=$(curl https://api.github.com/repos/sokil/statsd-http-proxy/releases/latest 2>/dev/null | grep tag_name | awk -F'"' '{print $4}') && \
11+
LATEST_VERSION=$(curl https://api.github.com/repos/sokil/statsd-http-proxy/releases/latest 2>/dev/null | grep tag_name | awk -F'"' '{print $4}') && \
12+
VERSION=${VERSION:-$LATEST_VERSION} && \
1013
# download, build source and install
1114
wget https://github.com/sokil/statsd-http-proxy/archive/${VERSION}.tar.gz && \
1215
tar -zxvf ${VERSION}.tar.gz && \

0 commit comments

Comments
 (0)