Skip to content

Commit 944393a

Browse files
committed
use debian slim image for building golang application
1 parent 9225a67 commit 944393a

8 files changed

Lines changed: 11 additions & 11 deletions

File tree

06-building-container-images/api-golang/Dockerfile.1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Pin specific version for stability
2-
# Use alpine for reduced image size
3-
FROM golang:1.19-alpine
2+
# Use debian for easier build utilities
3+
FROM golang:1.19-bullseye-slim AS build
44

55
WORKDIR /app
66

06-building-container-images/api-golang/Dockerfile.2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Pin specific version for stability
2-
# Use alpine for reduced image size
3-
FROM golang:1.19-alpine
2+
# Use debian for easier build utilities
3+
FROM golang:1.19-bullseye-slim AS build
44

55
WORKDIR /app
66

06-building-container-images/api-golang/Dockerfile.3

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Pin specific version for stability
2-
# Use alpine for reduced image size
3-
FROM golang:1.19-alpine
2+
# Use debian for easier build utilities
3+
FROM golang:1.19-bullseye-slim AS build
44

55
WORKDIR /app
66

06-building-container-images/api-golang/Dockerfile.4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Pin specific version for stability
22
# Use separate stage for building image
33
# Use debian for easier build utilities
4-
FROM golang:1.19-bullseye AS build
4+
FROM golang:1.19-bullseye-slim AS build
55

66
WORKDIR /app
77

06-building-container-images/api-golang/Dockerfile.5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Pin specific version for stability
22
# Use separate stage for building image
33
# Use debian for easier build utilities
4-
FROM golang:1.19-bullseye AS build
4+
FROM golang:1.19-bullseye-slim AS build
55

66
WORKDIR /app
77

06-building-container-images/api-golang/Dockerfile.6

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Pin specific version for stability
22
# Use separate stage for building image
33
# Use debian for easier build utilities
4-
FROM golang:1.19-bullseye AS build
4+
FROM golang:1.19-bullseye-slim AS build
55

66
# Add non root user
77
RUN useradd -u 1001 nonroot

06-building-container-images/api-golang/Dockerfile.7

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Pin specific version for stability
22
# Use separate stage for building image
33
# Use debian for easier build utilities
4-
FROM golang:1.19-bullseye AS build
4+
FROM golang:1.19-bullseye-slim AS build
55

66
# Add non root user
77
RUN useradd -u 1001 nonroot

06-building-container-images/api-golang/Dockerfile.8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Pin specific version for stability
22
# Use separate stage for building image
33
# Use debian for easier build utilities
4-
FROM golang:1.19-bullseye AS build-base
4+
FROM golang:1.19-bullseye-slim AS build
55

66
WORKDIR /app
77

0 commit comments

Comments
 (0)