Skip to content

Commit

Permalink
build: run tdnf upgrade directly in images
Browse files Browse the repository at this point in the history
  • Loading branch information
dkoshkin committed Sep 11, 2024
1 parent a385b64 commit 395a128
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 4 additions & 2 deletions images/driver/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
ARG GOLANG_IMAGE=golang:1.21

# This build arg allows the specification of a custom base image.
ARG BASE_IMAGE=gcr.io/cloud-provider-vsphere/extra/csi-driver-base:latest
ARG BASE_IMAGE=photon:4.0

################################################################################
## BUILD STAGE ##
Expand Down Expand Up @@ -50,10 +50,12 @@ FROM ${BASE_IMAGE}
# This build arg is the git commit to embed in the CSI binary
ARG GIT_COMMIT

# This label will be overridden from driver base image
LABEL git_commit=$GIT_COMMIT
LABEL "maintainers"="Divyen Patel <[email protected]>, Sandeep Pissay Srinivasa Rao <[email protected]>, Xing Yang <[email protected]>"

# Upgrade installed packages to pick up CVE fixes
RUN tdnf -y upgrade && tdnf clean all

# install nfs-utils, util-linux and e2fsprogs
# nfs-utils : The nfs-utils package contains simple nfs client service.
# util-linux : Utilities for handling file systems, consoles, partitions.
Expand Down
7 changes: 5 additions & 2 deletions images/syncer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
ARG GOLANG_IMAGE=golang:1.21

# This build arg allows the specification of a custom base image.
ARG BASE_IMAGE=gcr.io/cloud-provider-vsphere/extra/csi-driver-base:latest
ARG BASE_IMAGE=photon:4.0

################################################################################
## BUILD STAGE ##
Expand Down Expand Up @@ -51,8 +51,11 @@ FROM ${BASE_IMAGE}
# This build arg is the git commit to embed in the CSI binary
ARG GIT_COMMIT

# This label will be overridden from driver base image
LABEL git_commit=$GIT_COMMIT
LABEL "maintainers"="Divyen Patel <[email protected]>, Sandeep Pissay Srinivasa Rao <[email protected]>, Xing Yang <[email protected]>"

# Upgrade installed packages to pick up CVE fixes
RUN tdnf -y upgrade && tdnf clean all

COPY --from=builder /build/vsphere-syncer /bin/vsphere-syncer

Expand Down

0 comments on commit 395a128

Please sign in to comment.