From 3281980e363330b109ed6013b1742071711526bf Mon Sep 17 00:00:00 2001 From: Jamie Curnow Date: Thu, 29 Apr 2021 11:22:17 +1000 Subject: [PATCH] Remove platform specific determination --- docker/Dockerfile | 18 +++++++++--------- docker/Dockerfile.golang | 4 ++-- docker/Dockerfile.node | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 02dc753..6a22b6a 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -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 " 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 diff --git a/docker/Dockerfile.golang b/docker/Dockerfile.golang index 4f67814..981817f 100644 --- a/docker/Dockerfile.golang +++ b/docker/Dockerfile.golang @@ -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 diff --git a/docker/Dockerfile.node b/docker/Dockerfile.node index 0bade68..742bba1 100644 --- a/docker/Dockerfile.node +++ b/docker/Dockerfile.node @@ -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 " ARG TARGETPLATFORM