Skip to content

Commit 4c0debb

Browse files
authored
Merge pull request #8 from devilbox/release-0.5
Add more platforms
2 parents 2098486 + a191b76 commit 4c0debb

File tree

9 files changed

+241
-23
lines changed

9 files changed

+241
-23
lines changed

.github/workflows/params.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,26 @@ env:
1515
{
1616
"NAME": "ngrok",
1717
"VERSION": ["2"],
18-
"FLAVOUR": ["latest", "stretch", "alpine"],
19-
"ARCH": ["linux/amd64", "linux/386", "linux/arm64"]
18+
"FLAVOUR": ["latest", "alpine"],
19+
"ARCH": ["linux/amd64", "linux/386", "linux/arm64", "linux/arm/v7", "linux/arm/v6", "linux/ppc64le", "linux/s390x"]
20+
},
21+
{
22+
"NAME": "ngrok",
23+
"VERSION": ["2"],
24+
"FLAVOUR": ["bookworm", "bullseye"],
25+
"ARCH": ["linux/amd64", "linux/386", "linux/arm64", "linux/arm/v7", "linux/arm/v6", "linux/ppc64le", "linux/s390x", "linux/mips64le"]
26+
},
27+
{
28+
"NAME": "ngrok",
29+
"VERSION": ["2"],
30+
"FLAVOUR": ["buster"],
31+
"ARCH": ["linux/amd64", "linux/386", "linux/arm64", "linux/ppc64le", "linux/s390x", "linux/mips64le"]
32+
},
33+
{
34+
"NAME": "ngrok",
35+
"VERSION": ["2"],
36+
"FLAVOUR": ["stretch"],
37+
"ARCH": ["linux/amd64", "linux/386", "linux/arm64", "linux/arm/v7", "linux/arm/v6"]
2038
}
2139
]
2240

Dockerfiles/Dockerfile.alpine

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ ARG ARCH
44
RUN set -eux \
55
&& apk add \
66
ca-certificates \
7-
curl
7+
curl \
8+
&& update-ca-certificates
89

910
RUN set -eux \
1011
&& URL="$( \

Dockerfiles/Dockerfile.bookworm

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
FROM debian:bookworm-slim as builder
2+
ARG ARCH
3+
4+
RUN set -eux \
5+
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
6+
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
7+
ca-certificates \
8+
curl \
9+
&& rm -rf /var/lib/apt/lists/* \
10+
&& update-ca-certificates
11+
12+
RUN set -eux \
13+
&& URL="$( \
14+
curl -sS --fail https://ngrok.com/download \
15+
| grep -Eo "http(s)?://.+ngrok-stable-${ARCH}\.tgz" \
16+
| head -1 \
17+
)" \
18+
&& curl -sS --fail -o /tmp/ngrok.tgz "${URL}" \
19+
&& tar xvfz /tmp/ngrok.tgz \
20+
&& rm /tmp/ngrok.tgz \
21+
&& mv ngrok /usr/local/bin \
22+
&& ngrok version | grep -E '^ngrok.+[.0-9]+$'
23+
24+
25+
FROM debian:bookworm-slim as final
26+
27+
###
28+
### Labels
29+
###
30+
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
31+
#LABEL "org.opencontainers.image.created"=""
32+
#LABEL "org.opencontainers.image.version"=""
33+
#LABEL "org.opencontainers.image.revision"=""
34+
LABEL "maintainer"="cytopia <[email protected]>"
35+
LABEL "org.opencontainers.image.authors"="cytopia <[email protected]>"
36+
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-ngrok"
37+
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-ngrok"
38+
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-ngrok"
39+
LABEL "org.opencontainers.image.vendor"="devilbox"
40+
LABEL "org.opencontainers.image.licenses"="MIT"
41+
LABEL "org.opencontainers.image.ref.name"="ngrok"
42+
LABEL "org.opencontainers.image.title"="ngrok"
43+
LABEL "org.opencontainers.image.description"="ngrok"
44+
45+
RUN set -x \
46+
&& useradd -m -U -u 6737 -s /bin/bash ngrok \
47+
&& mkdir /home/ngrok/.ngrok2 \
48+
&& chown ngrok:ngrok /home/ngrok/.ngrok2
49+
50+
COPY --from=builder /usr/local/bin/ngrok /usr/local/bin/ngrok
51+
COPY data/docker-entrypoint.sh /docker-entrypoint.sh
52+
COPY data/ngrok.yml /home/ngrok/.ngrok2/ngrok.yml
53+
54+
RUN set -x \
55+
&& chown ngrok:ngrok /home/ngrok/.ngrok2/ngrok.yml
56+
57+
USER ngrok
58+
ENV user=ngrok
59+
60+
CMD ["/docker-entrypoint.sh"]

Dockerfiles/Dockerfile.bullseye

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
FROM debian:bullseye-slim as builder
2+
ARG ARCH
3+
4+
RUN set -eux \
5+
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
6+
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
7+
ca-certificates \
8+
curl \
9+
&& rm -rf /var/lib/apt/lists/* \
10+
&& update-ca-certificates
11+
12+
RUN set -eux \
13+
&& URL="$( \
14+
curl -sS --fail https://ngrok.com/download \
15+
| grep -Eo "http(s)?://.+ngrok-stable-${ARCH}\.tgz" \
16+
| head -1 \
17+
)" \
18+
&& curl -sS --fail -o /tmp/ngrok.tgz "${URL}" \
19+
&& tar xvfz /tmp/ngrok.tgz \
20+
&& rm /tmp/ngrok.tgz \
21+
&& mv ngrok /usr/local/bin \
22+
&& ngrok version | grep -E '^ngrok.+[.0-9]+$'
23+
24+
25+
FROM debian:bullseye-slim as final
26+
27+
###
28+
### Labels
29+
###
30+
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
31+
#LABEL "org.opencontainers.image.created"=""
32+
#LABEL "org.opencontainers.image.version"=""
33+
#LABEL "org.opencontainers.image.revision"=""
34+
LABEL "maintainer"="cytopia <[email protected]>"
35+
LABEL "org.opencontainers.image.authors"="cytopia <[email protected]>"
36+
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-ngrok"
37+
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-ngrok"
38+
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-ngrok"
39+
LABEL "org.opencontainers.image.vendor"="devilbox"
40+
LABEL "org.opencontainers.image.licenses"="MIT"
41+
LABEL "org.opencontainers.image.ref.name"="ngrok"
42+
LABEL "org.opencontainers.image.title"="ngrok"
43+
LABEL "org.opencontainers.image.description"="ngrok"
44+
45+
RUN set -x \
46+
&& useradd -m -U -u 6737 -s /bin/bash ngrok \
47+
&& mkdir /home/ngrok/.ngrok2 \
48+
&& chown ngrok:ngrok /home/ngrok/.ngrok2
49+
50+
COPY --from=builder /usr/local/bin/ngrok /usr/local/bin/ngrok
51+
COPY data/docker-entrypoint.sh /docker-entrypoint.sh
52+
COPY data/ngrok.yml /home/ngrok/.ngrok2/ngrok.yml
53+
54+
RUN set -x \
55+
&& chown ngrok:ngrok /home/ngrok/.ngrok2/ngrok.yml
56+
57+
USER ngrok
58+
ENV user=ngrok
59+
60+
CMD ["/docker-entrypoint.sh"]

Dockerfiles/Dockerfile.buster

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
FROM debian:buster-slim as builder
2+
ARG ARCH
3+
4+
RUN set -eux \
5+
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
6+
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
7+
ca-certificates \
8+
curl \
9+
&& rm -rf /var/lib/apt/lists/* \
10+
&& update-ca-certificates
11+
12+
RUN set -eux \
13+
&& URL="$( \
14+
curl -sS --fail https://ngrok.com/download \
15+
| grep -Eo "http(s)?://.+ngrok-stable-${ARCH}\.tgz" \
16+
| head -1 \
17+
)" \
18+
&& curl -sS --fail -o /tmp/ngrok.tgz "${URL}" \
19+
&& tar xvfz /tmp/ngrok.tgz \
20+
&& rm /tmp/ngrok.tgz \
21+
&& mv ngrok /usr/local/bin \
22+
&& ngrok version | grep -E '^ngrok.+[.0-9]+$'
23+
24+
25+
FROM debian:buster-slim as final
26+
27+
###
28+
### Labels
29+
###
30+
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
31+
#LABEL "org.opencontainers.image.created"=""
32+
#LABEL "org.opencontainers.image.version"=""
33+
#LABEL "org.opencontainers.image.revision"=""
34+
LABEL "maintainer"="cytopia <[email protected]>"
35+
LABEL "org.opencontainers.image.authors"="cytopia <[email protected]>"
36+
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-ngrok"
37+
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-ngrok"
38+
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-ngrok"
39+
LABEL "org.opencontainers.image.vendor"="devilbox"
40+
LABEL "org.opencontainers.image.licenses"="MIT"
41+
LABEL "org.opencontainers.image.ref.name"="ngrok"
42+
LABEL "org.opencontainers.image.title"="ngrok"
43+
LABEL "org.opencontainers.image.description"="ngrok"
44+
45+
RUN set -x \
46+
&& useradd -m -U -u 6737 -s /bin/bash ngrok \
47+
&& mkdir /home/ngrok/.ngrok2 \
48+
&& chown ngrok:ngrok /home/ngrok/.ngrok2
49+
50+
COPY --from=builder /usr/local/bin/ngrok /usr/local/bin/ngrok
51+
COPY data/docker-entrypoint.sh /docker-entrypoint.sh
52+
COPY data/ngrok.yml /home/ngrok/.ngrok2/ngrok.yml
53+
54+
RUN set -x \
55+
&& chown ngrok:ngrok /home/ngrok/.ngrok2/ngrok.yml
56+
57+
USER ngrok
58+
ENV user=ngrok
59+
60+
CMD ["/docker-entrypoint.sh"]

Dockerfiles/Dockerfile.latest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Dockerfile.stretch
1+
Dockerfile.alpine

Dockerfiles/Dockerfile.stretch

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ RUN set -eux \
66
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
77
ca-certificates \
88
curl \
9-
&& rm -rf /var/lib/apt/lists/*
9+
&& rm -rf /var/lib/apt/lists/* \
10+
&& update-ca-certificates
1011

1112
RUN set -eux \
1213
&& URL="$( \

Makefile

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ TAG = latest
2525

2626
# Makefile.docker overwrites
2727
NAME = ngrok
28-
VERSION = 5.5
28+
VERSION = latest
2929
IMAGE = devilbox/ngrok
3030
FLAVOUR = latest
3131
FILE = Dockerfile.$(FLAVOUR)
@@ -68,12 +68,22 @@ help:
6868
# -------------------------------------------------------------------------------------------------
6969
# Docker Targets
7070
# -------------------------------------------------------------------------------------------------
71+
72+
NGROK = $(subst /,-,$(ARCH))
73+
ifeq ($(strip $(ARCH)),linux/arm/v6)
74+
NGROK = linux-arm
75+
endif
76+
ifeq ($(strip $(ARCH)),linux/arm/v7)
77+
NGROK = linux-arm
78+
endif
79+
80+
7181
.PHONY: build
72-
build: ARGS=--build-arg ARCH=$(subst /,-,$(ARCH))
82+
build: ARGS=--build-arg ARCH=$(NGROK)
7383
build: docker-arch-build
7484

7585
.PHONY: rebuild
76-
rebuild: ARGS=--build-arg ARCH=$(subst /,-,$(ARCH))
86+
rebuild: ARGS=--build-arg ARCH=$(NGROK)
7787
rebuild: docker-arch-rebuild
7888

7989
.PHONY: push

README.md

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,36 @@
1111
[![](https://images.microbadger.com/badges/image/devilbox/ngrok.svg)](https://microbadger.com/images/devilbox/ngrok "ngrok")
1212
[![License](https://img.shields.io/badge/license-MIT-%233DA639.svg)](https://opensource.org/licenses/MIT)
1313

14-
**Available Architectures:** `amd64`, `i386`, `arm64`
14+
**Available Architectures:** `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6`, `ppc64le`, `s390x`, `mips64le`
1515

1616
| Docker Hub | Upstream Project |
1717
|------------|------------------|
1818
| <a href="https://hub.docker.com/r/devilbox/ngrok"><img height="82px" src="http://dockeri.co/image/devilbox/ngrok" /></a> | <a href="https://github.com/cytopia/devilbox" ><img height="82px" src="https://raw.githubusercontent.com/devilbox/artwork/master/submissions_banner/cytopia/01/png/banner_256_trans.png" /></a> |
1919

2020
## Available Docker tags
2121

22-
| Docker Tag | Description |
23-
|---------------------------------|--------------------------------------------------------------|
24-
| `latest` | Latest Debian Stretch image (default) |
25-
| `stretch` | Latest Debian Stretch image |
26-
| `alpine` | Latest Alpine image |
27-
| | |
28-
| `[0-9]\.[0-9]+` | Git tagged Debian Sretch image. E.g: `0.53` |
29-
| `stretch-[0-9]\.[0-9]+` | Git tagged Debian Stretch image. E.g: `stretch-0.53` |
30-
| `alpine-[0-9]\.[0-9]+` | Git tagged Alpine image. E.g: `alpine-0.53` |
31-
| | |
32-
| `release-[0-9]\.[0-9]+` | Git branch Debian Stretch image. E.g: `release-0.53` |
33-
| `stretch-release-[0-9]\.[0-9]+` | Git branch Debian Stretch image. E.g: `stretch-release-0.53` |
34-
| `alpine-release-[0-9]\.[0-9]+` | Git branch Alpine image. E.g: `alpine-release-0.53` |
35-
22+
| Docker Tag | Description |
23+
|----------------------------------|---------------------------------------------------------------|
24+
| `latest` | Latest Alpine image (default) |
25+
| `alpine` | Latest Alpine image |
26+
| `bookworm` | Latest Debian Bookworm image |
27+
| `bullseye` | Latest Debian Bullseye image |
28+
| `buster` | Latest Debian Buster image |
29+
| `stretch` | Latest Debian Stretch image |
30+
| | |
31+
| `[0-9]\.[0-9]+` | Git tagged Alpine image. E.g: `0.53` |
32+
| `alpine-[0-9]\.[0-9]+` | Git tagged Alpine image. E.g: `alpine-0.53` |
33+
| `bookworm-[0-9]\.[0-9]+` | Git tagged Debian Stretch image. E.g: `bookworm-0.53` |
34+
| `bullseye-[0-9]\.[0-9]+` | Git tagged Debian Stretch image. E.g: `bullseye-0.53` |
35+
| `buster-[0-9]\.[0-9]+` | Git tagged Debian Stretch image. E.g: `buster-0.53` |
36+
| `stretch-[0-9]\.[0-9]+` | Git tagged Debian Stretch image. E.g: `stretch-0.53` |
37+
| | |
38+
| `release-[0-9]\.[0-9]+` | Git branch Alpine image. E.g: `release-0.53` |
39+
| `alpine-release-[0-9]\.[0-9]+` | Git branch Alpine image. E.g: `alpine-release-0.53` |
40+
| `bookworm-release-[0-9]\.[0-9]+` | Git branch Debian Stretch image. E.g: `bookworm-release-0.53` |
41+
| `bullseye-release-[0-9]\.[0-9]+` | Git branch Debian Stretch image. E.g: `bullseye-release-0.53` |
42+
| `buster-release-[0-9]\.[0-9]+` | Git branch Debian Stretch image. E.g: `buster-release-0.53` |
43+
| `stretch-release-[0-9]\.[0-9]+` | Git branch Debian Stretch image. E.g: `stretch-release-0.53` |
3644

3745

3846
## Documentation

0 commit comments

Comments
 (0)