From 944393a3aca8e077c51178346450d1f017bd4e0c Mon Sep 17 00:00:00 2001 From: sid palas Date: Wed, 22 Mar 2023 10:21:58 -0400 Subject: [PATCH] use debian slim image for building golang application --- 06-building-container-images/api-golang/Dockerfile.1 | 4 ++-- 06-building-container-images/api-golang/Dockerfile.2 | 4 ++-- 06-building-container-images/api-golang/Dockerfile.3 | 4 ++-- 06-building-container-images/api-golang/Dockerfile.4 | 2 +- 06-building-container-images/api-golang/Dockerfile.5 | 2 +- 06-building-container-images/api-golang/Dockerfile.6 | 2 +- 06-building-container-images/api-golang/Dockerfile.7 | 2 +- 06-building-container-images/api-golang/Dockerfile.8 | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/06-building-container-images/api-golang/Dockerfile.1 b/06-building-container-images/api-golang/Dockerfile.1 index 78b7084..9125e3d 100644 --- a/06-building-container-images/api-golang/Dockerfile.1 +++ b/06-building-container-images/api-golang/Dockerfile.1 @@ -1,6 +1,6 @@ # Pin specific version for stability -# Use alpine for reduced image size -FROM golang:1.19-alpine +# Use debian for easier build utilities +FROM golang:1.19-bullseye-slim AS build WORKDIR /app diff --git a/06-building-container-images/api-golang/Dockerfile.2 b/06-building-container-images/api-golang/Dockerfile.2 index 7d0caee..8aa31fe 100644 --- a/06-building-container-images/api-golang/Dockerfile.2 +++ b/06-building-container-images/api-golang/Dockerfile.2 @@ -1,6 +1,6 @@ # Pin specific version for stability -# Use alpine for reduced image size -FROM golang:1.19-alpine +# Use debian for easier build utilities +FROM golang:1.19-bullseye-slim AS build WORKDIR /app diff --git a/06-building-container-images/api-golang/Dockerfile.3 b/06-building-container-images/api-golang/Dockerfile.3 index ce7b424..968e524 100644 --- a/06-building-container-images/api-golang/Dockerfile.3 +++ b/06-building-container-images/api-golang/Dockerfile.3 @@ -1,6 +1,6 @@ # Pin specific version for stability -# Use alpine for reduced image size -FROM golang:1.19-alpine +# Use debian for easier build utilities +FROM golang:1.19-bullseye-slim AS build WORKDIR /app diff --git a/06-building-container-images/api-golang/Dockerfile.4 b/06-building-container-images/api-golang/Dockerfile.4 index adb295c..f88c53a 100644 --- a/06-building-container-images/api-golang/Dockerfile.4 +++ b/06-building-container-images/api-golang/Dockerfile.4 @@ -1,7 +1,7 @@ # Pin specific version for stability # Use separate stage for building image # Use debian for easier build utilities -FROM golang:1.19-bullseye AS build +FROM golang:1.19-bullseye-slim AS build WORKDIR /app diff --git a/06-building-container-images/api-golang/Dockerfile.5 b/06-building-container-images/api-golang/Dockerfile.5 index 24654ac..8beefc7 100644 --- a/06-building-container-images/api-golang/Dockerfile.5 +++ b/06-building-container-images/api-golang/Dockerfile.5 @@ -1,7 +1,7 @@ # Pin specific version for stability # Use separate stage for building image # Use debian for easier build utilities -FROM golang:1.19-bullseye AS build +FROM golang:1.19-bullseye-slim AS build WORKDIR /app diff --git a/06-building-container-images/api-golang/Dockerfile.6 b/06-building-container-images/api-golang/Dockerfile.6 index dd66d10..02488e6 100644 --- a/06-building-container-images/api-golang/Dockerfile.6 +++ b/06-building-container-images/api-golang/Dockerfile.6 @@ -1,7 +1,7 @@ # Pin specific version for stability # Use separate stage for building image # Use debian for easier build utilities -FROM golang:1.19-bullseye AS build +FROM golang:1.19-bullseye-slim AS build # Add non root user RUN useradd -u 1001 nonroot diff --git a/06-building-container-images/api-golang/Dockerfile.7 b/06-building-container-images/api-golang/Dockerfile.7 index 5c00a6f..5ef3c35 100644 --- a/06-building-container-images/api-golang/Dockerfile.7 +++ b/06-building-container-images/api-golang/Dockerfile.7 @@ -1,7 +1,7 @@ # Pin specific version for stability # Use separate stage for building image # Use debian for easier build utilities -FROM golang:1.19-bullseye AS build +FROM golang:1.19-bullseye-slim AS build # Add non root user RUN useradd -u 1001 nonroot diff --git a/06-building-container-images/api-golang/Dockerfile.8 b/06-building-container-images/api-golang/Dockerfile.8 index d2b3d2c..fb62ffa 100644 --- a/06-building-container-images/api-golang/Dockerfile.8 +++ b/06-building-container-images/api-golang/Dockerfile.8 @@ -1,7 +1,7 @@ # Pin specific version for stability # Use separate stage for building image # Use debian for easier build utilities -FROM golang:1.19-bullseye AS build-base +FROM golang:1.19-bullseye-slim AS build WORKDIR /app