Skip to content

Commit 67e7958

Browse files
committed
Injecting ARM v7/v8 architecture for LibreSSL
1 parent 9611db8 commit 67e7958

6 files changed

Lines changed: 48 additions & 18 deletions

File tree

mainline/Dockerfile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ FROM alpine:latest
33
ENV NGINX_VERSION=1.31.2
44
ENV LIBRESSL_VERSION=4.3.2
55

6+
ARG TARGETARCH=unknown
7+
ARG TARGETOS=unknown
8+
69
# -----------------------------------------------------------------------------
710
# Build flags -- kept as ENV so they are visible in `docker inspect`
811
# -----------------------------------------------------------------------------
@@ -59,6 +62,11 @@ ENV CONFIG="\
5962
"
6063

6164
RUN set -eux \
65+
&& LIBRESSL_HOST= \
66+
&& case "${TARGETARCH:-}-${TARGETVARIANT:-}" in \
67+
arm-v6) LIBRESSL_HOST=armv6-alpine-linux-musleabihf ;; \
68+
arm-v7) LIBRESSL_HOST=armv7-alpine-linux-musleabihf ;; \
69+
esac \
6270
\
6371
# -- System user -----------------------------------------------------------
6472
&& addgroup -S nginx \
@@ -239,9 +247,6 @@ RUN set -eux \
239247
COPY nginx.conf /etc/nginx/nginx.conf
240248
COPY nginx.vh.no-default.conf /etc/nginx/conf.d/default.conf
241249

242-
ARG TARGETARCH=unknown
243-
ARG TARGETOS=unknown
244-
245250
LABEL org.opencontainers.image.title="FreeNGINX with LibreSSL" \
246251
org.opencontainers.image.description="FreeNGINX ${NGINX_VERSION} built on Alpine with LibreSSL" \
247252
org.opencontainers.image.source="https://github.com/nginx-modules/docker-freenginx-libressl" \

mainline/Dockerfile.loongarch64

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ FROM --platform=linux/loong64 loongarch64/alpine:3.21
33
ENV NGINX_VERSION=1.31.2
44
ENV LIBRESSL_VERSION=4.3.2
55

6+
ARG TARGETARCH=unknown
7+
ARG TARGETOS=unknown
8+
69
# -----------------------------------------------------------------------------
710
# Build flags -- kept as ENV so they are visible in `docker inspect`
811
# -----------------------------------------------------------------------------
@@ -59,6 +62,11 @@ ENV CONFIG="\
5962
"
6063

6164
RUN set -eux \
65+
&& LIBRESSL_HOST= \
66+
&& case "${TARGETARCH:-}-${TARGETVARIANT:-}" in \
67+
arm-v6) LIBRESSL_HOST=armv6-alpine-linux-musleabihf ;; \
68+
arm-v7) LIBRESSL_HOST=armv7-alpine-linux-musleabihf ;; \
69+
esac \
6270
\
6371
# -- System user -----------------------------------------------------------
6472
&& addgroup -S nginx \
@@ -239,9 +247,6 @@ RUN set -eux \
239247
COPY nginx.conf /etc/nginx/nginx.conf
240248
COPY nginx.vh.no-default.conf /etc/nginx/conf.d/default.conf
241249

242-
ARG TARGETARCH=unknown
243-
ARG TARGETOS=unknown
244-
245250
LABEL org.opencontainers.image.title="FreeNGINX with LibreSSL" \
246251
org.opencontainers.image.description="FreeNGINX ${NGINX_VERSION} built on Alpine with LibreSSL" \
247252
org.opencontainers.image.source="https://github.com/nginx-modules/docker-freenginx-libressl" \

mainline/Dockerfile.mips64le

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ FROM --platform=linux/mips64le alpine:3.14
33
ENV NGINX_VERSION=1.31.2
44
ENV LIBRESSL_VERSION=4.3.2
55

6+
ARG TARGETARCH=unknown
7+
ARG TARGETOS=unknown
8+
69
# -----------------------------------------------------------------------------
710
# Build flags -- kept as ENV so they are visible in `docker inspect`
811
# -----------------------------------------------------------------------------
@@ -59,6 +62,11 @@ ENV CONFIG="\
5962
"
6063

6164
RUN set -eux \
65+
&& LIBRESSL_HOST= \
66+
&& case "${TARGETARCH:-}-${TARGETVARIANT:-}" in \
67+
arm-v6) LIBRESSL_HOST=armv6-alpine-linux-musleabihf ;; \
68+
arm-v7) LIBRESSL_HOST=armv7-alpine-linux-musleabihf ;; \
69+
esac \
6270
\
6371
# -- System user -----------------------------------------------------------
6472
&& addgroup -S nginx \
@@ -239,9 +247,6 @@ RUN set -eux \
239247
COPY nginx.conf /etc/nginx/nginx.conf
240248
COPY nginx.vh.no-default.conf /etc/nginx/conf.d/default.conf
241249

242-
ARG TARGETARCH=unknown
243-
ARG TARGETOS=unknown
244-
245250
LABEL org.opencontainers.image.title="FreeNGINX with LibreSSL" \
246251
org.opencontainers.image.description="FreeNGINX ${NGINX_VERSION} built on Alpine with LibreSSL" \
247252
org.opencontainers.image.source="https://github.com/nginx-modules/docker-freenginx-libressl" \

stable/Dockerfile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ FROM alpine:latest
33
ENV NGINX_VERSION=1.30.1
44
ENV LIBRESSL_VERSION=4.3.2
55

6+
ARG TARGETARCH=unknown
7+
ARG TARGETOS=unknown
8+
69
# -----------------------------------------------------------------------------
710
# Build flags -- kept as ENV so they are visible in `docker inspect`
811
# -----------------------------------------------------------------------------
@@ -59,6 +62,11 @@ ENV CONFIG="\
5962
"
6063

6164
RUN set -eux \
65+
&& LIBRESSL_HOST= \
66+
&& case "${TARGETARCH:-}-${TARGETVARIANT:-}" in \
67+
arm-v6) LIBRESSL_HOST=armv6-alpine-linux-musleabihf ;; \
68+
arm-v7) LIBRESSL_HOST=armv7-alpine-linux-musleabihf ;; \
69+
esac \
6270
\
6371
# -- System user -----------------------------------------------------------
6472
&& addgroup -S nginx \
@@ -239,9 +247,6 @@ RUN set -eux \
239247
COPY nginx.conf /etc/nginx/nginx.conf
240248
COPY nginx.vh.no-default.conf /etc/nginx/conf.d/default.conf
241249

242-
ARG TARGETARCH=unknown
243-
ARG TARGETOS=unknown
244-
245250
LABEL org.opencontainers.image.title="FreeNGINX with LibreSSL" \
246251
org.opencontainers.image.description="FreeNGINX ${NGINX_VERSION} built on Alpine with LibreSSL" \
247252
org.opencontainers.image.source="https://github.com/nginx-modules/docker-freenginx-libressl" \

stable/Dockerfile.loongarch64

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ FROM --platform=linux/loong64 loongarch64/alpine:3.21
33
ENV NGINX_VERSION=1.30.1
44
ENV LIBRESSL_VERSION=4.3.2
55

6+
ARG TARGETARCH=unknown
7+
ARG TARGETOS=unknown
8+
69
# -----------------------------------------------------------------------------
710
# Build flags -- kept as ENV so they are visible in `docker inspect`
811
# -----------------------------------------------------------------------------
@@ -59,6 +62,11 @@ ENV CONFIG="\
5962
"
6063

6164
RUN set -eux \
65+
&& LIBRESSL_HOST= \
66+
&& case "${TARGETARCH:-}-${TARGETVARIANT:-}" in \
67+
arm-v6) LIBRESSL_HOST=armv6-alpine-linux-musleabihf ;; \
68+
arm-v7) LIBRESSL_HOST=armv7-alpine-linux-musleabihf ;; \
69+
esac \
6270
\
6371
# -- System user -----------------------------------------------------------
6472
&& addgroup -S nginx \
@@ -239,9 +247,6 @@ RUN set -eux \
239247
COPY nginx.conf /etc/nginx/nginx.conf
240248
COPY nginx.vh.no-default.conf /etc/nginx/conf.d/default.conf
241249

242-
ARG TARGETARCH=unknown
243-
ARG TARGETOS=unknown
244-
245250
LABEL org.opencontainers.image.title="FreeNGINX with LibreSSL" \
246251
org.opencontainers.image.description="FreeNGINX ${NGINX_VERSION} built on Alpine with LibreSSL" \
247252
org.opencontainers.image.source="https://github.com/nginx-modules/docker-freenginx-libressl" \

stable/Dockerfile.mips64le

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ FROM --platform=linux/mips64le alpine:3.14
33
ENV NGINX_VERSION=1.30.1
44
ENV LIBRESSL_VERSION=4.3.2
55

6+
ARG TARGETARCH=unknown
7+
ARG TARGETOS=unknown
8+
69
# -----------------------------------------------------------------------------
710
# Build flags -- kept as ENV so they are visible in `docker inspect`
811
# -----------------------------------------------------------------------------
@@ -59,6 +62,11 @@ ENV CONFIG="\
5962
"
6063

6164
RUN set -eux \
65+
&& LIBRESSL_HOST= \
66+
&& case "${TARGETARCH:-}-${TARGETVARIANT:-}" in \
67+
arm-v6) LIBRESSL_HOST=armv6-alpine-linux-musleabihf ;; \
68+
arm-v7) LIBRESSL_HOST=armv7-alpine-linux-musleabihf ;; \
69+
esac \
6270
\
6371
# -- System user -----------------------------------------------------------
6472
&& addgroup -S nginx \
@@ -239,9 +247,6 @@ RUN set -eux \
239247
COPY nginx.conf /etc/nginx/nginx.conf
240248
COPY nginx.vh.no-default.conf /etc/nginx/conf.d/default.conf
241249

242-
ARG TARGETARCH=unknown
243-
ARG TARGETOS=unknown
244-
245250
LABEL org.opencontainers.image.title="FreeNGINX with LibreSSL" \
246251
org.opencontainers.image.description="FreeNGINX ${NGINX_VERSION} built on Alpine with LibreSSL" \
247252
org.opencontainers.image.source="https://github.com/nginx-modules/docker-freenginx-libressl" \

0 commit comments

Comments
 (0)