Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updates containers source for marinara updates #8154

Merged
merged 2 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .pipelines/containerSourceData/scripts/BuildBaseContainers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,10 @@ function initialization {
# Set various image names.
BASE_IMAGE_NAME="$ACR_NAME_FULL/base/core:$IMAGE_TAG"
BASE_NONROOT_IMAGE_NAME="$ACR_NAME_FULL/base/core:$NONROOT_IMAGE_TAG"

DISTROLESS_BASE_IMAGE_NAME="$ACR_NAME_FULL/distroless/base:$IMAGE_TAG"
DISTROLESS_BASE_NONROOT_IMAGE_NAME="$ACR_NAME_FULL/distroless/base:$NONROOT_IMAGE_TAG"

DISTROLESS_MINIMAL_IMAGE_NAME="$ACR_NAME_FULL/distroless/minimal:$IMAGE_TAG"
DISTROLESS_MINIMAL_NONROOT_IMAGE_NAME="$ACR_NAME_FULL/distroless/minimal:$NONROOT_IMAGE_TAG"

DISTROLESS_DEBUG_NONROOT_IMAGE_NAME="$ACR_NAME_FULL/distroless/debug:$NONROOT_IMAGE_TAG"
DISTROLESS_DEBUG_IMAGE_NAME="$ACR_NAME_FULL/distroless/debug:$IMAGE_TAG"

Expand Down Expand Up @@ -274,17 +271,18 @@ function docker_build_custom {

function docker_build_marinara {
echo "+++ Build Marinara image: $MARINARA_IMAGE_NAME"

local build_dir="$WORK_DIR/marinara_build_dir"
mkdir -p "$build_dir"
git clone "https://github.com/microsoft/$MARINARA.git" "$build_dir"
pushd "$build_dir"

sed -E "s|^FROM mcr\..*installer$|FROM $BASE_IMAGE_NAME as installer|g" -i "dockerfile-$MARINARA"

docker build . \
-t "$MARINARA_IMAGE_NAME" \
-f dockerfile-$MARINARA \
--no-cache
--build-arg AZL_VERSION="$AZL_VERSION" \
--no-cache \
--progress=plain

popd > /dev/null
sudo rm -rf "$build_dir"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function DockerBuild {
docker build . \
-t "$containerName" \
-f "$marinaraSrcDir/dockerfiles/dockerfile-new-image" \
--build-arg MARINER_VERSION="$azureLinuxVersion" \
--build-arg AZL_VERSION="$azureLinuxVersion" \
--build-arg IMAGE_TYPE="$imageType" \
--build-arg PACKAGES_TO_INSTALL="$packagesToInstall" \
--build-arg PACKAGES_TO_HOLDBACK="$packagesToHoldback" \
Expand Down Expand Up @@ -58,7 +58,7 @@ function create_distroless_container {

echo "+++ Clone marinara repo"
git clone "https://github.com/microsoft/$marinara.git" "$WORK_DIR/$marinaraSrcDir"

# It is important to operate from the $WORK_DIR to ensure that docker can access the files.
pushd "$WORK_DIR" > /dev/null

Expand Down Expand Up @@ -113,7 +113,7 @@ function create_distroless_container {
"$rpmsPath"

popd > /dev/null

echo "+++ Save distroless container images to file PublishedContainers-$IMAGE.txt"
{
echo "$standardContainerName";
Expand Down
Loading