Skip to content

Commit 2cad66a

Browse files
committed
build: parameterize build and deploy base images
1 parent 5aef81e commit 2cad66a

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

Containerfile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
# This builds Boulder in a Docker container, then creates an image
2-
# containing just the built Boulder binaries plus some ancillary
3-
# files that are useful for predeployment testing.
4-
FROM docker.io/ubuntu:24.04 AS builder
1+
# This multi-stage build first builds Boulder in a container, then
2+
# creates a minimal image containing the built Boulder binaries and
3+
# ancillary files for pre-deployment testing.
4+
ARG BUILDER_BASE=docker.io/ubuntu:24.04
5+
ARG FINAL_BASE=docker.io/ubuntu:24.04
6+
7+
FROM ${BUILDER_BASE} AS builder
58

69
ARG COMMIT_ID
710
ARG GO_VERSION
@@ -32,7 +35,7 @@ RUN go install \
3235
-mod=vendor \
3336
./...
3437

35-
FROM docker.io/ubuntu:24.04
38+
FROM ${FINAL_BASE}
3639

3740
ARG VERSION
3841

0 commit comments

Comments
 (0)