Remove platform specific determination

This commit is contained in:
Jamie Curnow
2021-04-29 11:22:17 +10:00
parent b51a2a5efd
commit 3281980e36
3 changed files with 12 additions and 12 deletions
+9 -9
View File
@@ -2,7 +2,7 @@
# Go Builder
#############
FROM --platform=${TARGETPLATFORM:-linux/amd64} golang as go
FROM golang:latest as go
ENV MKCERT_VERSION=1.4.2
RUN mkdir /workspace
@@ -17,28 +17,28 @@ RUN go build -ldflags "-X main.Version=v${MKCERT_VERSION}" -o /bin/mkcert
# Nginx Builder
#############
FROM --platform=${TARGETPLATFORM:-linux/amd64} debian:stable-slim as builder
FROM debian:stable-slim as builder
ARG OPENRESTY_VERSION
ARG LUA_VERSION
ARG LUAROCKS_VERSION
RUN apt-get update \
&& apt-get install -y wget build-essential libreadline-dev openssl unzip libncurses-dev libpcre3-dev libssl-dev zlib1g-dev
&& apt-get install -y --no-install-recommends wget build-essential libreadline-dev openssl unzip libncurses-dev libpcre3-dev libssl-dev zlib1g-dev
# Lua build
ADD ./scripts/build-lua /tmp/build-lua
COPY ./scripts/build-lua /tmp/build-lua
RUN /tmp/build-lua
# Nginx build
ADD ./scripts/build-openresty /tmp/build-openresty
COPY ./scripts/build-openresty /tmp/build-openresty
RUN /tmp/build-openresty
#############
# Final Image
#############
FROM --platform=${TARGETPLATFORM:-linux/amd64} debian:stable-slim
FROM debian:stable-slim
LABEL maintainer="Jamie Curnow <jc@jc21.com>"
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
@@ -52,7 +52,7 @@ RUN echo "Base: debian:stable-slim, ${TARGETPLATFORM:-linux/amd64}" > /built-for
# OpenResty uses LuaJIT which has a dependency on GCC
RUN apt-get update \
&& apt-get install -y curl figlet openssl libpcre3 zlib1g apache2-utils tzdata perl libreadline7 unzip libncurses6 make gcc \
&& apt-get install -y --no-install-recommends curl figlet openssl libpcre3 zlib1g apache2-utils tzdata perl libreadline7 unzip libncurses6 make gcc \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
@@ -61,11 +61,11 @@ ADD ./files/.bashrc /root/.bashrc
# Copy lua and luarocks builds from first image
COPY --from=builder /tmp/lua /tmp/lua
COPY --from=builder /tmp/luarocks /tmp/luarocks
ADD ./scripts/install-lua /tmp/install-lua
COPY ./scripts/install-lua /tmp/install-lua
# Copy openresty build from first image
COPY --from=builder /tmp/openresty /tmp/openresty
ADD ./scripts/install-openresty /tmp/install-openresty
COPY ./scripts/install-openresty /tmp/install-openresty
# Copy golang built packages
COPY --from=go /bin/mkcert /bin/mkcert
+2 -2
View File
@@ -1,5 +1,5 @@
FROM --platform=${TARGETPLATFORM:-linux/amd64} golang as go
FROM --platform=${TARGETPLATFORM:-linux/amd64} jc21/nginx-full:${BASE_TAG:-latest}
FROM golang:latest as go
FROM jc21/nginx-full:${BASE_TAG:-latest}
ARG TARGETPLATFORM
+1 -1
View File
@@ -1,4 +1,4 @@
FROM --platform=${TARGETPLATFORM:-linux/amd64} jc21/nginx-full:${BASE_TAG:-latest}
FROM jc21/nginx-full:${BASE_TAG:-latest}
LABEL maintainer="Jamie Curnow <jc@jc21.com>"
ARG TARGETPLATFORM