User/priya/passing versions as args (#2478)

* Deleted __pythonVersions.sh

* Modified PlatformInstallerBase.cs

* Modified Php, phpfpm dockerfiles

* Modified bullseye.dockerfile in php-fmp

* Modified azureFunctions.JamStack.Dockerfile

* Removed Unnecessary files

* modified dotnet dockerfiles

* deleted unused sh files in build folder

* Removed Unnecessary ENV variables

* deleted __functions.sh

* Modified PlatformInstallerBase.cs

* modified PlatformInstallerBase.yml

* modified args in dockerfiles

* Removed unnecessary lines

* Modified dotnet 9 dockerfile

* Created a default version file in Oryx

* Created a default version file in Oryx

* Created a default version file in Oryx

* making default version file executable

* moved defaultversions.sh to build folder

* removed default values

* modified php-fpm 8.2 dockerfile

* created build_runtime_images.sh to  build locally

* removed unnecessary zips

* added setting_variables.yml for local build

* Modified setting_variables.yml

* removed DotNetCoreAgent.2.8.42.zip

* removed default versions file

* modified NodeDynamicInstallationTest.cs

* added more constants to constants.yml

* modified Oryx.sln

* recovered build/buildPlatformBinaries.sh build/buildTestBuildImages.sh files

* modified buildTestBuildImages.sh

* recovered __functions.sh

* recovered __functions.sh

* updated versions in constants.yml

* updated php 8.3 buster image

* passed YAML version from constants.yml

* Recovered __pythonVersions.sh

* modified to include __pythonVersions.sh

* passed YARN version also as parameter

* removed extra line

* passed dotnetCoreagent version as arg

* Added build_buildimages.sh

* Removed unnecessary  comments

* removed unnecessary comments

* resolved comments
This commit is contained in:
Saipriya-1144 2024-08-22 09:53:49 +05:30 коммит произвёл GitHub
Родитель a6fa0f9597
Коммит b4287080d9
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
65 изменённых файлов: 463 добавлений и 2049 удалений

Просмотреть файл

@ -29,7 +29,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{0FEBE7DD
build\buildRunTimeImageBases.sh = build\buildRunTimeImageBases.sh build\buildRunTimeImageBases.sh = build\buildRunTimeImageBases.sh
build\buildRunTimeImages.sh = build\buildRunTimeImages.sh build\buildRunTimeImages.sh = build\buildRunTimeImages.sh
build\buildSln.sh = build\buildSln.sh build\buildSln.sh = build\buildSln.sh
build\buildTestBuildImages.sh = build\buildTestBuildImages.sh
build\constants.yaml = build\constants.yaml build\constants.yaml = build\constants.yaml
build\testBuildImages.sh = build\testBuildImages.sh build\testBuildImages.sh = build\testBuildImages.sh
build\testBuildScriptGenerator.sh = build\testBuildScriptGenerator.sh build\testBuildScriptGenerator.sh = build\testBuildScriptGenerator.sh

Просмотреть файл

@ -1,8 +0,0 @@
# This file was auto-generated from 'constants.yaml'. Changes may be overridden.
CONDA_VERSION='4.12.0-0'
CONDA_ENVIRONMENT_YML_FILE_NAME='environment.yml'
ORYX_GENERATED_ENVIRONMENT_YML_FILE_NAME='oryx.environment.yml'
DEFAULT_CONDA_ENVIRONMENT_YML_FILE_TEMPLATE_NAME='default.envrionment.yml.template'
DEFAULT_PYTHON2_VERSION='2.7.15'
DEFAULT_PYTHON2_CONDA_ENVIRONMENT_YML_FILE_TEMPLATE_NAME='python2.default.envrionment.yml.template'

Просмотреть файл

@ -1,28 +0,0 @@
# This file was auto-generated from 'constants.yaml'. Changes may be overridden.
ENVIRONMENT_TYPE='ORYX_ENV_TYPE'
APPLICATION_INSIGHTS_CONNECTION_STRING_ENV_VAR_NAME='ORYX_AI_CONNECTION_STRING'
APP_SERVICE_APP_NAME_ENV_VAR_NAME='APPSETTING_WEBSITE_SITE_NAME'
SCM_COMMIT_ID_ENV_VAR_NAME='SCM_COMMIT_ID'
PHP_ORIGIN='PHP_ORIGIN'
PHP_FPM_CONFIGURATION_FILE='/usr/local/etc/php-fpm.d/www.conf'
PHP_FPM_MAX_CHILDREN_ENV_VAR_NAME='FPM_MAX_CHILDREN'
PHP_FPM_START_SERVERS_ENV_VAR_NAME='FPM_START_SERVERS'
PHP_FPM_MIN_SPARE_SERVERS_ENV_VAR_NAME='FPM_MIN_SPARE_SERVERS'
PHP_FPM_MAX_SPARE_SERVERS_ENV_VAR_NAME='FPM_MAX_SPARE_SERVERS'
PHP_FPM_MAX_CHILDREN_SETTING_NAME='pm.max_children'
PHP_FPM_START_SERVERS_SETTING_NAME='pm.start_servers'
PHP_FPM_MIN_SPARE_SERVERS_SETTING_NAME='pm.min_spare_servers'
PHP_FPM_MAX_SPARE_SERVERS_SETTING_NAME='pm.max_spare_servers'
DEBIAN_FLAVOR='DEBIAN_FLAVOR'
USER_APP_INSIGHTS_KEY_ENV='APPINSIGHTS_INSTRUMENTATIONKEY'
USER_APP_INSIGHTS_AGENT_EXTENSION_VERSION='ApplicationInsightsAgent_EXTENSION_VERSION'
USER_APP_INSIGHTS_CONNECTION_STRING_ENV='APPLICATIONINSIGHTS_CONNECTION_STRING'
USER_DOTNET_AI_VERSION='2.8.42'
USER_DOTNET_STARTUP_HOOKS='/DotNetCoreAgent/2.8.42/StartupHook/Microsoft.ApplicationInsights.StartupHook.dll'
USER_NETCORE_HOSTINGSTARTUP_ASSEMBLIES='Microsoft.ApplicationInsights.StartupBootstrapper'
PYTHON_ENABLE_GUNICORN_MULTI_WORKERS_ENV_VAR_NAME='PYTHON_ENABLE_GUNICORN_MULTIWORKERS'
PYTHON_GUNICORN_CONFIG_PATH_ENV_VAR_NAME='PYTHON_USE_GUNICORN_CONFIG_FROM_PATH'
PYTHON_GUNICORN_CUSTOM_WORKER_NUM='PYTHON_GUNICORN_CUSTOM_WORKER_NUM'
PYTHON_GUNICORN_CUSTOM_THREAD_NUM='PYTHON_GUNICORN_CUSTOM_THREAD_NUM'
NGINX_CONF_FILE='NGINX_CONF_FILE'

Просмотреть файл

@ -1,13 +0,0 @@
# This file was auto-generated from 'constants.yaml'. Changes may be overridden.
FINAL_STRETCH_DOT_NET_CORE_31_SDK_VERSION='3.1.420'
FINAL_STRETCH_DOT_NET_CORE_APP_31_RUN_TIME_VERSION='3.1.26'
FINAL_STRETCH_ASPNET_CORE_APP_31_RUN_TIME_VERSION='3.1.26'
FINAL_STRETCH_DOT_NET_60_SDK_VERSION='6.0.301'
FINAL_STRETCH_DOT_NET_CORE_APP_60_RUN_TIME_VERSION='6.0.6'
FINAL_STRETCH_ASPNET_CORE_APP_60_RUN_TIME_VERSION='6.0.6'
FINAL_STRETCH_DOT_NET_70_SDK_VERSION='7.0.302'
FINAL_STRETCH_DOT_NET_CORE_APP_70_RUN_TIME_VERSION='7.0.5'
FINAL_STRETCH_ASPNET_CORE_APP_70_RUN_TIME_VERSION='7.0.5'
FINAL_STRETCH_NODE14_VERSION='14.21.3'
FINAL_STRETCH_NODE16_VERSION='16.20.0'

Просмотреть файл

@ -1,10 +0,0 @@
# This file was auto-generated from 'constants.yaml'. Changes may be overridden.
GOLANG16_VERSION='1.16.7'
GOLANG16_TAR_SHA256='7fe7a73f55ba3e2285da36f8b085e5c0159e9564ef5f63ee0ed6b818ade8ef04'
GOLANG17_VERSION='1.17'
GOLANG17_TAR_SHA256='6bf89fc4f5ad763871cf7eac80a2d594492de7a818303283f1366a7f6a30372d'
GOLANG18_VERSION='1.18.10'
GOLANG18_TAR_SHA256='5e05400e4c79ef5394424c0eff5b9141cb782da25f64f79d54c98af0a37f8d49'
GOLANG19_VERSION='1.19.7'
GOLANG19_TAR_SHA256='7a75720c9b066ae1750f6bcc7052aba70fa3813f4223199ee2a2315fd3eb533d'

Просмотреть файл

@ -1,5 +0,0 @@
# This file was auto-generated from 'constants.yaml'. Changes may be overridden.
JAVA_VERSION='17.0.2'
JAVA_VERSION11='11.0.14'
MAVEN_VERSION='3.8.5'

Просмотреть файл

@ -1,13 +0,0 @@
# This file was auto-generated from 'constants.yaml'. Changes may be overridden.
GEM_VERSION='3.3.21'
RUBY31_VERSION='3.1.3'
RUBY31_TAR_SHA256='4ee161939826bcdfdafa757cf8e293a7f14e357f62be7144f040335cc8c7371a'
RUBY27_VERSION='2.7.7'
RUBY27_TAR_SHA256='b38dff2e1f8ce6e5b7d433f8758752987a6b2adfd9bc7571dbc42ea5d04e3e4c'
RUBY26_VERSION='2.6.6'
RUBY26_TAR_SHA256='5db187882b7ac34016cd48d7032e197f07e4968f406b0690e20193b9b424841f'
RUBY25_VERSION='2.5.8'
RUBY25_TAR_SHA256='0391b2ffad3133e274469f9953ebfd0c9f7c186238968cbdeeb0651aa02a4d6d'
RUBY30_VERSION='3.0.5'
RUBY30_TAR_SHA256='cf7cb5ba2030fe36596a40980cdecfd79a0337d35860876dc2b10a38675bddde'

Просмотреть файл

@ -1,10 +0,0 @@
# This file was auto-generated from 'constants.yaml'. Changes may be overridden.
DOTNETCORE_STAGING_RUNTIME_VERSIONS=("")
PYTHON_STAGING_RUNTIME_VERSIONS=("")
NODE_STAGING_RUNTIME_VERSIONS=("")
JAVA_STAGING_RUNTIME_VERSIONS=("")
PHP_STAGING_RUNTIME_VERSIONS=("")
HUGO_STAGING_RUNTIME_VERSIONS=("")
RUBY_STAGING_RUNTIME_VERSIONS=("")
GOLANG_STAGING_RUNTIME_VERSIONS=("")

Просмотреть файл

@ -1,632 +0,0 @@
#!/bin/bash
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
# --------------------------------------------------------------------------------------------
set -ex
declare -r REPO_DIR=$( cd $( dirname "$0" ) && cd .. && pwd )
# Load all variables
source $REPO_DIR/build/__variables.sh
source $REPO_DIR/build/__functions.sh
source $REPO_DIR/build/__sdkStorageConstants.sh
source $REPO_DIR/build/__nodeVersions.sh
cd "$BUILD_IMAGES_BUILD_CONTEXT_DIR"
declare BUILD_SIGNED=""
# Check to see if the build is by scheduled ORYX-CI or other azure devops build
# SIGNTYPE is set to 'real' on the Oryx-CI build definition itself (not in yaml file)
if [ "$SIGNTYPE" == "real" ] || [ "$SIGNTYPE" == "Real" ]
then
# "SignType" will be real only for builds by scheduled and/or manual builds of ORYX-CI
BUILD_SIGNED="true"
else
# locally we need to fake "binaries" directory to get a successful "copybuildscriptbinaries" build stage
mkdir -p $BUILD_IMAGES_BUILD_CONTEXT_DIR/binaries
fi
# NOTE: We are using only one label here and put all information in it
# in order to limit the number of layers that are created
labelContent="git_commit=$GIT_COMMIT, build_number=$BUILD_NUMBER, release_tag_name=$RELEASE_TAG_NAME"
# https://medium.com/@Drew_Stokes/bash-argument-parsing-54f3b81a6a8f
PARAMS=""
while (( "$#" )); do
case "$1" in
-t|--type)
imageTypeToBuild=$2
shift 2
;;
-s|--sdk-storage-account-url)
sdkStorageAccountUrl=$2
shift 2
;;
--) # end argument parsing
shift
break
;;
-*|--*=) # unsupported flags
echo "Error: Unsupported flag $1" >&2
exit 1
;;
*) # preserve positional arguments
PARAMS="$PARAMS $1"
shift
;;
esac
done
# set positional arguments in their proper place
eval set -- "$PARAMS"
echo
echo "Image type to build is set to: $imageTypeToBuild"
if [ -z "$sdkStorageAccountUrl" ]; then
sdkStorageAccountUrl=$PROD_SDK_CDN_STORAGE_BASE_URL
fi
# checking and retrieving token for the `oryxsdksstaging` account.
retrieveSastokenFromKeyVault $sdkStorageAccountUrl
echo
echo "SDK storage account url set to: $sdkStorageAccountUrl"
declare -r supportFilesImageName="oryxdevmcr.azurecr.io/private/oryx/support-files-image-for-build"
function BuildAndTagStage()
{
local dockerFile="$1"
local stageName="$2"
local stageTagName="$ACR_PUBLIC_PREFIX/$2"
echo
echo "Building stage '$stageName' with tag '$stageTagName'..."
docker build \
--target $stageName \
-t $stageTagName \
-f "$dockerFile" \
.
}
# Create artifact dir & files
mkdir -p "$ARTIFACTS_DIR/images"
touch $ACR_BUILD_IMAGES_ARTIFACTS_FILE
> $ACR_BUILD_IMAGES_ARTIFACTS_FILE
function createImageNameWithReleaseTag() {
local imageNameToBeTaggedUniquely="$1"
# Retag build image with build number tags
if [ "$AGENT_BUILD" == "true" ]
then
IFS=':' read -ra IMAGE_NAME <<< "$imageNameToBeTaggedUniquely"
local repo="${IMAGE_NAME[0]}"
local tag="$BUILD_DEFINITIONNAME.$RELEASE_TAG_NAME"
if [ ${#IMAGE_NAME[@]} -eq 2 ]; then
local uniqueImageName="$imageNameToBeTaggedUniquely-$tag"
else
local uniqueImageName="$repo:$tag"
fi
echo
echo "Retagging image '$imageNameToBeTaggedUniquely' as '$uniqueImageName'..."
docker tag "$imageNameToBeTaggedUniquely" "$uniqueImageName"
# Write image list to artifacts file
echo "$uniqueImageName" >> $ACR_BUILD_IMAGES_ARTIFACTS_FILE
else
# Write non-ci image to artifacts file as is, for local testing
echo "$imageNameToBeTaggedUniquely" >> $ACR_BUILD_IMAGES_ARTIFACTS_FILE
fi
}
function buildGitHubRunnersUbuntuBaseImage() {
echo
echo "----Building the image which uses GitHub runners' buildpackdeps-focal-scm specific digest----------"
docker build -t "oryxdevmcr.azurecr.io/private/oryx/githubrunners-buildpackdeps-focal" \
-f "$BUILD_IMAGES_GITHUB_RUNNERS_BUILDPACKDEPS_FOCAL_DOCKERFILE" \
.
}
function buildGitHubRunnersBullseyeBaseImage() {
echo
echo "----Building the image which uses GitHub runners' buildpackdeps-bullseye-scm specific digest----------"
docker build -t "oryxdevmcr.azurecr.io/private/oryx/githubrunners-buildpackdeps-bullseye" \
-f "$BUILD_IMAGES_GITHUB_RUNNERS_BUILDPACKDEPS_BULLSEYE_DOCKERFILE" \
.
}
function buildGitHubRunnersBookwormBaseImage() {
echo
echo "----Building the image which uses GitHub runners' buildpackdeps-bookworm-scm specific digest----------"
docker build -t "oryxdevmcr.azurecr.io/private/oryx/githubrunners-buildpackdeps-bookworm" \
-f "$BUILD_IMAGES_GITHUB_RUNNERS_BUILDPACKDEPS_BOOKWORM_DOCKERFILE" \
.
}
function buildGitHubRunnersBusterBaseImage() {
echo
echo "----Building the image which uses GitHub runners' buildpackdeps-buster-scm specific digest----------"
docker build -t "oryxdevmcr.azurecr.io/private/oryx/githubrunners-buildpackdeps-buster" \
-f "$BUILD_IMAGES_GITHUB_RUNNERS_BUILDPACKDEPS_BUSTER_DOCKERFILE" \
.
}
function buildGitHubRunnersBaseImage() {
echo
echo "----Building the image which uses GitHub runners' buildpackdeps-stretch specific digest----------"
docker build -t "oryxdevmcr.azurecr.io/private/oryx/githubrunners-buildpackdeps-stretch" \
-f "$BUILD_IMAGES_GITHUB_RUNNERS_BUILDPACKDEPS_STRETCH_DOCKERFILE" \
.
}
function buildTemporaryFilesImage() {
buildGitHubRunnersBaseImage
buildGitHubRunnersBusterBaseImage
buildGitHubRunnersUbuntuBaseImage
buildGitHubRunnersBullseyeBaseImage
buildGitHubRunnersBookwormBaseImage
# Create the following image so that it's contents can be copied to the rest of the images below
echo
echo "------Creating temporary files image-------"
docker build -t "oryxdevmcr.azurecr.io/private/oryx/support-files-image-for-build" \
-f "$BUILD_IMAGES_SUPPORT_FILES_DOCKERFILE" \
.
}
function buildBuildScriptGeneratorImage() {
buildTemporaryFilesImage
# Create the following image so that it's contents can be copied to the rest of the images below
echo
echo "-------------Creating build script generator image-------------------"
docker build -t "oryxdevmcr.azurecr.io/private/oryx/buildscriptgenerator" \
--build-arg AGENTBUILD=$BUILD_SIGNED \
--build-arg GIT_COMMIT=$GIT_COMMIT \
--build-arg BUILD_NUMBER=$BUILD_NUMBER \
--build-arg RELEASE_TAG_NAME=$RELEASE_TAG_NAME \
-f "$BUILD_IMAGES_BUILDSCRIPTGENERATOR_DOCKERFILE" \
.
}
function buildGitHubActionsImage() {
local debianFlavor=$1
local devImageTag=github-actions
local builtImageName="$ACR_BUILD_GITHUB_ACTIONS_IMAGE_NAME"
if [ -z "$debianFlavor" ] ; then
debianFlavor="stretch"
fi
devImageTag=$devImageTag-debian-$debianFlavor
echo "dev image tag: "$devImageTag
builtImageName=$builtImageName-debian-$debianFlavor
echo "built image name: "$builtImageName
buildBuildScriptGeneratorImage
echo
echo "-------------Creating build image for GitHub Actions-------------------"
DOCKER_BUILDKIT=1 docker build -t $builtImageName \
--build-arg AI_CONNECTION_STRING=$APPLICATION_INSIGHTS_CONNECTION_STRING \
--build-arg SDK_STORAGE_BASE_URL_VALUE=$sdkStorageAccountUrl \
--build-arg DEBIAN_FLAVOR=$debianFlavor \
--label com.microsoft.oryx="$labelContent" \
-f "$BUILD_IMAGES_GITHUB_ACTIONS_DOCKERFILE" \
--secret id=oryx_sdk_storage_account_access_token,env=ORYX_SDK_STORAGE_ACCOUNT_ACCESS_TOKEN \
.
createImageNameWithReleaseTag $builtImageName
echo
echo "$builtImageName image history"
docker history $builtImageName
echo
docker tag $builtImageName $DEVBOX_BUILD_IMAGES_REPO:$devImageTag
docker build \
-t "$ORYXTESTS_BUILDIMAGE_REPO:$devImageTag" \
--build-arg PARENT_IMAGE_BASE=$devImageTag \
-f "$ORYXTESTS_GITHUB_ACTIONS_BUILDIMAGE_DOCKERFILE" \
.
}
function buildJamStackImage() {
local debianFlavor=$1
local devImageTag=azfunc-jamstack
local parentImageTag=cli
local builtImageName="$ACR_AZURE_FUNCTIONS_JAMSTACK_IMAGE_NAME"
buildCliImage $debianFlavor
if [ -z "$debianFlavor" ]; then
debianFlavor="stretch"
fi
parentImageTag=debian-$debianFlavor
devImageTag=$devImageTag-debian-$debianFlavor
echo "dev image tag: "$devImageTag
builtImageName=$builtImageName-debian-$debianFlavor
echo "built image name: "$builtImageName
# NOTE: do not pass in label as it is inherited from base image
# Also do not pass in build-args as they are used in base image for creating environment variables which are in
# turn inherited by this image.
echo
echo "-------------Creating AzureFunctions JamStack image-------------------"
DOCKER_BUILDKIT=1 docker build -t $builtImageName \
-f "$BUILD_IMAGES_AZ_FUNCS_JAMSTACK_DOCKERFILE" \
--build-arg PARENT_DEBIAN_FLAVOR=$parentImageTag \
--build-arg DEBIAN_FLAVOR=$debianFlavor \
--secret id=oryx_sdk_storage_account_access_token,env=ORYX_SDK_STORAGE_ACCOUNT_ACCESS_TOKEN \
.
createImageNameWithReleaseTag $builtImageName
echo
echo "$builtImageName image history"
docker history $builtImageName
echo
docker tag $builtImageName $DEVBOX_BUILD_IMAGES_REPO:$devImageTag
}
function buildLtsVersionsImage() {
ltsBuildImageDockerFile=$BUILD_IMAGES_LTS_VERSIONS_DOCKERFILE
local debianFlavor=$1
local devImageTag=lts-versions
local builtImageName="$ACR_BUILD_LTS_VERSIONS_IMAGE_NAME"
local testImageName="$ORYXTESTS_BUILDIMAGE_REPO:lts-versions"
if [ -z "$debianFlavor" ] || [ "$debianFlavor" == "stretch" ]; then
debianFlavor="stretch"
else
testImageFile=$ORYXTESTS_LTS_VERSIONS_BUSTER_BUILDIMAGE_DOCKERFILE
ltsBuildImageDockerFile=$BUILD_IMAGES_LTS_VERSIONS_BUSTER_DOCKERFILE
fi
testImageName=$testImageName-debian-$debianFlavor
devImageTag=$devImageTag-debian-$debianFlavor
builtImageName=$builtImageName-debian-$debianFlavor
echo "dev image tag: "$devImageTag
echo "built image name: "$builtImageName
echo "test image name: "$testImageName
buildBuildScriptGeneratorImage
buildGitHubRunnersBaseImage $debianFlavor
BuildAndTagStage "$ltsBuildImageDockerFile" intermediate
echo
echo "-------------Creating lts versions build image-------------------"
DOCKER_BUILDKIT=1 docker build -t $builtImageName \
--build-arg AI_CONNECTION_STRING=$APPLICATION_INSIGHTS_CONNECTION_STRING \
--build-arg SDK_STORAGE_BASE_URL_VALUE=$sdkStorageAccountUrl \
--label com.microsoft.oryx="$labelContent" \
-f "$ltsBuildImageDockerFile" \
--secret id=oryx_sdk_storage_account_access_token,env=ORYX_SDK_STORAGE_ACCOUNT_ACCESS_TOKEN \
.
createImageNameWithReleaseTag $builtImageName
echo
echo "$builtImageName image history"
docker history $builtImageName
echo
docker tag $builtImageName $DEVBOX_BUILD_IMAGES_REPO:$devImageTag
echo
echo "Building a base image for tests..."
# Do not write this image tag to the artifacts file as we do not intend to push it
docker build -t $testImageName \
--build-arg PARENT_IMAGE_BASE=$devImageTag \
-f "$ORYXTESTS_LTS_VERSIONS_BUILDIMAGE_DOCKERFILE" \
.
}
function buildLatestImages() {
local debianFlavor=$1
if [ -z "$debianFlavor" ] ; then
debianFlavor="stretch"
fi
buildLtsVersionsImage $debianFlavor
echo
echo "-------------Creating latest build images-------------------"
local builtImageName="$ACR_BUILD_IMAGES_REPO:debian-$debianFlavor"
# NOTE: do not pass in label as it is inherited from base image
# Also do not pass in build-args as they are used in base image for creating environment variables which are in
# turn inherited by this image.
DOCKER_BUILDKIT=1 docker build -t $builtImageName \
-f "$BUILD_IMAGES_DOCKERFILE" \
--secret id=oryx_sdk_storage_account_access_token,env=ORYX_SDK_STORAGE_ACCOUNT_ACCESS_TOKEN \
.
createImageNameWithReleaseTag $builtImageName
# retag latest image with no tag so that it by default can be pulled 4 separate ways:
# - build
# - build:latest
# - build:<releaseTag>
# - build:<osType>-<osVersion>-<releaseTag>
docker tag $builtImageName "$ACR_BUILD_IMAGES_REPO"
createImageNameWithReleaseTag $ACR_BUILD_IMAGES_REPO
echo
echo "$builtImageName image history"
docker history $builtImageName
echo
docker tag $builtImageName "$DEVBOX_BUILD_IMAGES_REPO:debian-$debianFlavor"
echo
echo "Building a base image for tests..."
# Do not write this image tag to the artifacts file as we do not intend to push it
local testImageName="$ORYXTESTS_BUILDIMAGE_REPO:debian-$debianFlavor"
docker build -t $testImageName \
-f "$ORYXTESTS_BUILDIMAGE_DOCKERFILE" \
.
}
function buildVsoImage() {
buildBuildScriptGeneratorImage
buildGitHubRunnersUbuntuBaseImage
local debianFlavor=$1
if [ -z "$debianFlavor" ] || [ "$debianFlavor" == "focal" ]; then
BUILD_IMAGE=$BUILD_IMAGES_VSO_FOCAL_DOCKERFILE
local builtImageName="$ACR_BUILD_VSO_FOCAL_IMAGE_NAME"
local tagName="vso-ubuntu-focal"
elif [ "$debianFlavor" == "bullseye" ]; then
BUILD_IMAGE=$BUILD_IMAGES_VSO_BULLSEYE_DOCKERFILE
local builtImageName="$ACR_BUILD_VSO_BULLSEYE_IMAGE_NAME"
local tagName="vso-debian-bullseye"
else
echo "Unsupported VSO image Debian flavor."
exit 1
fi
BuildAndTagStage "$BUILD_IMAGE" intermediate
echo
echo "-------------Creating VSO $debianFlavor build image-------------------"
DOCKER_BUILDKIT=1 docker build -t $builtImageName \
--build-arg AI_CONNECTION_STRING=$APPLICATION_INSIGHTS_CONNECTION_STRING \
--build-arg SDK_STORAGE_BASE_URL_VALUE=$sdkStorageAccountUrl \
--label com.microsoft.oryx="$labelContent" \
-f "$BUILD_IMAGE" \
--secret id=oryx_sdk_storage_account_access_token,env=ORYX_SDK_STORAGE_ACCOUNT_ACCESS_TOKEN \
.
createImageNameWithReleaseTag $builtImageName
echo
echo "$builtImageName image history"
docker history $builtImageName
docker tag $builtImageName "$DEVBOX_BUILD_IMAGES_REPO:$tagName"
echo
echo "$builtImageName" >> $ACR_BUILD_IMAGES_ARTIFACTS_FILE
}
function buildCliImage() {
buildBuildScriptGeneratorImage
local debianFlavor=$1
local devImageRepo="$DEVBOX_CLI_BUILD_IMAGE_REPO"
local devImageTag="debian-$debianFlavor"
local builtImageName="$ACR_CLI_BUILD_IMAGE_REPO"
if [ -z "$debianFlavor" ] || [ $debianFlavor == "stretch" ] ; then
debianFlavor="stretch"
#Change buildImage name to fix validation pipeline
builtImageName="$builtImageName:debian-$debianFlavor"
else
builtImageName="$builtImageName:debian-$debianFlavor"
devImageRepo="$DEVBOX_CLI_BUILD_IMAGE_REPO-$debianFlavor"
fi
echo "dev image tag: "$devImageTag
echo "built image name: "$builtImageName
echo
echo "-------------Creating CLI image-------------------"
DOCKER_BUILDKIT=1 docker build -t $builtImageName \
--build-arg AI_CONNECTION_STRING=$APPLICATION_INSIGHTS_CONNECTION_STRING \
--build-arg SDK_STORAGE_BASE_URL_VALUE=$sdkStorageAccountUrl \
--build-arg DEBIAN_FLAVOR=$debianFlavor \
--label com.microsoft.oryx="$labelContent" \
-f "$BUILD_IMAGES_CLI_DOCKERFILE" \
--secret id=oryx_sdk_storage_account_access_token,env=ORYX_SDK_STORAGE_ACCOUNT_ACCESS_TOKEN \
.
createImageNameWithReleaseTag $builtImageName
echo
echo "$builtImageName image history"
docker history $builtImageName
docker tag $builtImageName "$devImageRepo:$devImageTag"
}
function buildCliBuilderImage() {
buildBuildScriptGeneratorImage
local osType=$1
local osFlavor=$2
local builtImageRepo="$ACR_CLI_BUILD_IMAGE_REPO"
local devImageRepo="$DEVBOX_CLI_BUILD_IMAGE_REPO"
if [ -z "$osType" && -z "$osFlavor" ]; then
osType="debian"
osFlavor="bullseye"
fi
imageTag="builder-$osType-$osFlavor"
devImageName="$devImageRepo:$imageTag"
builtImageName="$builtImageRepo:$imageTag"
echo
echo "-------------Creating CLI Builder image-------------------"
DOCKER_BUILDKIT=1 docker build -t $builtImageName \
--build-arg AI_CONNECTION_STRING=$APPLICATION_INSIGHTS_CONNECTION_STRING \
--build-arg SDK_STORAGE_BASE_URL_VALUE=$sdkStorageAccountUrl \
--build-arg DEBIAN_FLAVOR=$osFlavor \
--label com.microsoft.oryx="$labelContent" \
-f "$BUILD_IMAGES_CLI_BUILDER_DOCKERFILE" \
--secret id=oryx_sdk_storage_account_access_token,env=ORYX_SDK_STORAGE_ACCOUNT_ACCESS_TOKEN \
.
createImageNameWithReleaseTag $builtImageName
echo
echo "$builtImageName image history"
docker history $builtImageName
echo "Tagging '$builtImageName' with dev name '$devImageName'"
docker tag $builtImageName $devImageName
}
function buildFullImage() {
buildBuildScriptGeneratorImage
local debianFlavor=$1
local devImageTag=full
local builtImageName="$ACR_BUILD_FULL_IMAGE_NAME"
if [ -z "$debianFlavor" ] ; then
debianFlavor="stretch"
fi
devImageTag=$devImageTag-debian-$debianFlavor
echo "dev image tag: "$devImageTag
builtImageName=$builtImageName-debian-$debianFlavor
echo "built image name: "$builtImageName
echo
echo "-------------Creating full image-------------------"
DOCKER_BUILDKIT=1 docker build -t $builtImageName \
--build-arg AI_CONNECTION_STRING=$APPLICATION_INSIGHTS_CONNECTION_STRING \
--build-arg SDK_STORAGE_BASE_URL_VALUE=$sdkStorageAccountUrl \
--build-arg DEBIAN_FLAVOR=$debianFlavor \
--label com.microsoft.oryx="$labelContent" \
-f "$BUILD_IMAGES_FULL_DOCKERFILE" \
--secret id=oryx_sdk_storage_account_access_token,env=ORYX_SDK_STORAGE_ACCOUNT_ACCESS_TOKEN \
.
createImageNameWithReleaseTag $builtImageName
echo
echo "$builtImageName image history"
docker history $builtImageName
docker tag $builtImageName "$DEVBOX_BUILD_IMAGES_REPO:$devImageTag"
}
function buildBuildPackImage() {
# Build buildpack images
# 'pack create-builder' is not supported on Windows
if [[ "$OSTYPE" == "linux-gnu" ]] || [[ "$OSTYPE" == "darwin"* ]]; then
source $REPO_DIR/build/buildBuildpacksImages.sh
else
echo
echo "Skipping building Buildpacks images as platform '$OSTYPE' is not supported."
fi
}
if [ -z "$imageTypeToBuild" ]; then
buildGitHubActionsImage "bookworm"
buildGitHubActionsImage "bullseye"
buildGitHubActionsImage "buster"
buildGitHubActionsImage
buildJamStackImage "bullseye"
buildJamStackImage "buster"
buildJamStackImage
buildLtsVersionsImage "buster"
buildLtsVersionsImage
buildLatestImages
buildVsoImage "focal"
buildVsoImage "bullseye"
buildCliImage "buster"
buildCliImage "bullseye"
buildCliImage
buildCliBuilderImage "debian" "bullseye"
buildBuildPackImage
buildFullImage "buster"
buildFullImage "bullseye"
elif [ "$imageTypeToBuild" == "githubactions" ]; then
buildGitHubActionsImage
buildGitHubActionsImage "buster"
buildGitHubActionsImage "bullseye"
buildGitHubActionsImage "bookworm"
elif [ "$imageTypeToBuild" == "githubactions-bookworm" ]; then
buildGitHubActionsImage "bookworm"
elif [ "$imageTypeToBuild" == "githubactions-buster" ]; then
buildGitHubActionsImage "buster"
elif [ "$imageTypeToBuild" == "githubactions-bullseye" ]; then
buildGitHubActionsImage "bullseye"
elif [ "$imageTypeToBuild" == "githubactions-stretch" ]; then
buildGitHubActionsImage
elif [ "$imageTypeToBuild" == "jamstack" ]; then
buildJamStackImage
buildJamStackImage "buster"
buildJamStackImage "bullseye"
elif [ "$imageTypeToBuild" == "jamstack-bullseye" ]; then
buildJamStackImage "bullseye"
elif [ "$imageTypeToBuild" == "jamstack-buster" ]; then
buildJamStackImage "buster"
elif [ "$imageTypeToBuild" == "jamstack-stretch" ]; then
buildJamStackImage
elif [ "$imageTypeToBuild" == "ltsversions" ]; then
buildLtsVersionsImage
buildLtsVersionsImage "buster"
elif [ "$imageTypeToBuild" == "ltsversions-buster" ]; then
buildLtsVersionsImage "buster"
elif [ "$imageTypeToBuild" == "latest" ]; then
buildLatestImages
elif [ "$imageTypeToBuild" == "full" ]; then
buildFullImage "bullseye"
buildFullImage "buster"
elif [ "$imageTypeToBuild" == "vso-focal" ]; then
buildVsoImage "focal"
elif [ "$imageTypeToBuild" == "vso-bullseye" ]; then
buildVsoImage "bullseye"
elif [ "$imageTypeToBuild" == "cli" ]; then
buildCliImage
buildCliImage "buster"
buildCliImage "bullseye"
buildCliBuilderImage "debian" "bullseye"
elif [ "$imageTypeToBuild" == "cli-stretch" ]; then
buildCliImage
elif [ "$imageTypeToBuild" == "cli-buster" ]; then
buildCliImage "buster"
elif [ "$imageTypeToBuild" == "cli-bullseye" ]; then
buildCliImage "bullseye"
elif [ "$imageTypeToBuild" == "cli-builder-bullseye" ]; then
buildCliBuilderImage "debian" "bullseye"
elif [ "$imageTypeToBuild" == "buildpack" ]; then
buildBuildPackImage
else
echo "Error: Invalid value for '--type' switch. Valid values are: \
githubactions, jamstack, ltsversions, latest, full, vso-focal, cli, cli-builder-bullseye, buildpack"
exit 1
fi
echo
echo "List of images tagged (from '$ACR_BUILD_IMAGES_ARTIFACTS_FILE'):"
cat $ACR_BUILD_IMAGES_ARTIFACTS_FILE
echo
showDockerImageSizes
echo
dockerCleanupIfRequested
if [ -z "$BUILD_SIGNED" ]
then
rm -rf binaries
fi

Просмотреть файл

@ -7,8 +7,6 @@
set -ex set -ex
declare -r REPO_DIR=$( cd $( dirname "$0" ) && cd .. && pwd ) declare -r REPO_DIR=$( cd $( dirname "$0" ) && cd .. && pwd )
source $REPO_DIR/build/__pythonVersions.sh
pythonVersionGPG='' pythonVersionGPG=''
version="$1" version="$1"

Просмотреть файл

@ -1,215 +0,0 @@
#!/bin/bash
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
# --------------------------------------------------------------------------------------------
set -ex
declare -r REPO_DIR=$( cd $( dirname "$0" ) && cd .. && pwd )
# Load all variables
source $REPO_DIR/build/__variables.sh
source $REPO_DIR/build/__functions.sh
source $REPO_DIR/build/__nodeVersions.sh
source $REPO_DIR/build/__stagingRuntimeConstants.sh
declare -r NODE_BOOKWORM_VERSION_ARRAY=($NODE20_VERSION)
declare -r NODE_BULLSEYE_VERSION_ARRAY=($NODE20_VERSION $NODE18_VERSION $NODE16_VERSION $NODE14_VERSION)
declare -r NODE_BUSTER_VERSION_ARRAY=($NODE16_VERSION $NODE14_VERSION)
runtimeImagesSourceDir="$RUNTIME_IMAGES_SRC_DIR"
runtimeSubDir=""
runtimeImageDebianFlavor="buster"
if [ $# -eq 2 ]
then
echo "Locally building runtime '$runtimeSubDir'"
runtimeSubDir="$1"
runtimeImageDebianFlavor="$2"
elif [ $# -eq 1 ]
then
echo "CI Agent building runtime '$runtimeSubDir'"
runtimeImageDebianFlavor="$1"
fi
if [ ! -z "$runtimeSubDir" ]
then
runtimeImagesSourceDir="$runtimeImagesSourceDir/$runtimeSubDir"
if [ ! -d "$runtimeImagesSourceDir" ]; then
(>&2 echo "Unknown runtime '$runtimeSubDir'")
exit 1
fi
fi
# checking and retrieving token for the `oryxsdksstaging` account.
retrieveSastokenFromKeyVault $PRIVATE_STAGING_SDK_STORAGE_BASE_URL
echo
echo "Building the common base image wih bullseye, buster, and bookworm flavor '$RUNTIME_BASE_IMAGE_NAME'..."
echo
# Build the common base image first, so other images that depend on it get the latest version.
# We don't retrieve this image from a repository but rather build locally to make sure we get
# the latest version of its own base image.
docker build \
--pull \
--build-arg DEBIAN_FLAVOR=buster \
-f "$RUNTIME_BASE_IMAGE_DOCKERFILE_PATH" \
-t "oryxdevmcr.azurecr.io/private/oryx/$RUNTIME_BASE_IMAGE_NAME-buster" \
$REPO_DIR
docker build \
--pull \
--build-arg DEBIAN_FLAVOR=bullseye \
-f "$RUNTIME_BASE_IMAGE_DOCKERFILE_PATH" \
-t "oryxdevmcr.azurecr.io/private/oryx/$RUNTIME_BASE_IMAGE_NAME-bullseye" \
$REPO_DIR
docker build \
--pull \
--build-arg DEBIAN_FLAVOR=bookworm \
-f "$RUNTIME_BASE_IMAGE_DOCKERFILE_PATH" \
-t "oryxdevmcr.azurecr.io/private/oryx/$RUNTIME_BASE_IMAGE_NAME-bookworm" \
$REPO_DIR
labels="--label com.microsoft.oryx.git-commit=$GIT_COMMIT"
labels="$labels --label com.microsoft.oryx.build-number=$BUILD_NUMBER"
execAllGenerateDockerfiles "$runtimeImagesSourceDir" "generateDockerfiles.sh" "$runtimeImageDebianFlavor"
dockerFileName="base.$runtimeImageDebianFlavor.Dockerfile"
stagingDockerFileName="base.$runtimeImageDebianFlavor.staging.Dockerfile"
dockerFiles=$(find $runtimeImagesSourceDir -type f \( -name $dockerFileName -o -name $stagingDockerFileName \))
nodeDockerfiles=()
if [ "$runtimeSubDir" == "node" ]; then
docker build \
--build-arg DEBIAN_FLAVOR=$runtimeImageDebianFlavor \
-f "$REPO_DIR/images/runtime/commonbase/nodeRuntimeBase.Dockerfile" \
-t "oryxdevmcr.azurecr.io/private/oryx/oryx-node-run-base-$runtimeImageDebianFlavor" \
$REPO_DIR
NODE_VERSION_ARRAY=()
if [ "$runtimeImageDebianFlavor" == "bookworm" ];then
NODE_VERSION_ARRAY=("${NODE_BOOKWORM_VERSION_ARRAY[@]}")
elif [ "$runtimeImageDebianFlavor" == "bullseye" ];then
NODE_VERSION_ARRAY=("${NODE_BULLSEYE_VERSION_ARRAY[@]}")
elif [ "$runtimeImageDebianFlavor" == "buster" ]; then
NODE_VERSION_ARRAY=("${NODE_BUSTER_VERSION_ARRAY[@]}")
fi
for NODE_VERSION in "${NODE_VERSION_ARRAY[@]}"
do
IFS='.' read -ra SPLIT_VERSION <<< "$NODE_VERSION"
VERSION_DIRECTORY="${SPLIT_VERSION[0]}"
eachFile=$runtimeImagesSourceDir/$VERSION_DIRECTORY/$dockerFileName
nodeDockerfiles+=( "$eachFile" )
done
dockerFiles="${nodeDockerfiles[@]}"
fi
# Write the list of images that were built to artifacts folder
mkdir -p "$BASE_IMAGES_ARTIFACTS_FILE_PREFIX"
# NOTE: We create a unique artifacts file per platform since they are going to be built in parallel on CI
ARTIFACTS_FILE="$BASE_IMAGES_ARTIFACTS_FILE_PREFIX/$runtimeSubDir-runtimeimage-bases-$runtimeImageDebianFlavor.txt"
initFile="$runtimeImagesSourceDir/buildRunTimeImageBases_Init.sh"
if [ -f "$initFile" ]; then
$initFile $runtimeImageDebianFlavor
fi
if [ -z "$dockerFiles" ]
then
echo "Couldn't find any Dockerfiles with name '$dockerFileName' under '$runtimeImagesSourceDir' and its sub-directories."
exit 1
fi
clearedOutput=false
for dockerFile in $dockerFiles; do
dockerFileDir=$(dirname "${dockerFile}")
# Set $getTagName_result to the following format: {platformName}:{platformVersion}
getTagName $dockerFileDir
IFS=':' read -ra PARTS <<< "$getTagName_result"
platformName="${PARTS[0]}"
platformVersion="${PARTS[1]}"
if shouldStageRuntimeVersion $platformName $platformVersion ; then
# skip the normal base.{ostype}.Dockerfile if this version should be staged
if [[ "$dockerFile" != *"staging"* ]]; then
continue
fi
# Set $localImageTagName to the following format: oryxdevmcr.azurecr.io/staging/oryx/base:{platformName}-{platformVersion}-{osType}
localImageTagName="$BASE_IMAGES_STAGING_REPO:$platformName-$platformVersion-debian-$runtimeImageDebianFlavor"
else
# skip the base.{ostype}.staging.Dockerfile if this version should not be staged
if [[ "$dockerFile" == *"staging"* ]]; then
continue
fi
# Set $localImageTagName to the following format: oryxdevmcr.azurecr.io/public/oryx/base:{platformName}-{platformVersion}-{osType}
localImageTagName="$BASE_IMAGES_PUBLIC_REPO:$platformName-$platformVersion-debian-$runtimeImageDebianFlavor"
fi
echo
echo "Building image '$localImageTagName' for Dockerfile located at '$dockerFile'..."
cd $REPO_DIR
echo
# pass in env var as a secret, which is mounted during a single run command of the build
# https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#secret
DOCKER_BUILDKIT=1 docker build -f $dockerFile \
-t $localImageTagName \
--build-arg CACHEBUST=$(date +%s) \
--build-arg NODE14_VERSION=$NODE14_VERSION \
--build-arg NODE16_VERSION=$NODE16_VERSION \
--build-arg NODE18_VERSION=$NODE18_VERSION \
--build-arg NODE20_VERSION=$NODE20_VERSION \
--build-arg DEBIAN_FLAVOR=$runtimeImageDebianFlavor \
--secret id=oryx_sdk_storage_account_access_token,env=ORYX_SDK_STORAGE_ACCOUNT_ACCESS_TOKEN \
--secret id=dotnet_storage_account_token_id,env=DOTNET_PRIVATE_STORAGE_ACCOUNT_ACCESS_TOKEN \
$labels \
.
# Retag build image with build numbers as ACR tags
if [ "$AGENT_BUILD" == "true" ]
then
# $tag will follow a similar format to 20191024.1
uniqueImageName="$localImageTagName-$BUILD_NUMBER"
# Tag the image to follow a similar format to .../python:3.7-debian-bullseye-20191028.1
docker tag "$localImageTagName" "$uniqueImageName"
if [ $clearedOutput == "false" ]
then
# clear existing contents of the file, if any
> $ARTIFACTS_FILE
clearedOutput=true
fi
# add new content
echo
echo "Updating artifacts file with the built runtime image information..."
echo "$uniqueImageName" >> $ARTIFACTS_FILE
fi
cd $RUNTIME_IMAGES_SRC_DIR
done
if [ "$AGENT_BUILD" == "true" ]
then
echo
echo "List of images tagged (from '$ARTIFACTS_FILE'):"
cat $ARTIFACTS_FILE
fi
echo
showDockerImageSizes
echo
dockerCleanupIfRequested

Просмотреть файл

@ -1,386 +0,0 @@
#!/bin/bash
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
# --------------------------------------------------------------------------------------------
set -ex
declare -r REPO_DIR=$( cd $( dirname "$0" ) && cd .. && pwd )
# Load all variables
source $REPO_DIR/build/__extVarNames.sh
source $REPO_DIR/build/__variables.sh
source $REPO_DIR/build/__functions.sh
source $REPO_DIR/build/__sdkStorageConstants.sh
source $REPO_DIR/build/__stagingRuntimeConstants.sh
# Load platform versions for runtimes
source $REPO_DIR/build/__dotNetCoreRunTimeVersions.sh
source $REPO_DIR/build/__nodeVersions.sh
source $REPO_DIR/build/__phpVersions.sh
source $REPO_DIR/build/__pythonVersions.sh
source $REPO_DIR/build/__rubyVersions.sh
# Get the specific platform version used for each runtime image to assist with future patching
# e.g., for dotnetcore:7.0-debian-buster, we would retrieve 7.0.10 from the __dotNetCoreRunTimeVersions.sh file
function getRuntimeTagVersion()
{
if [ -z $1 ]
then
echo "Runtime platform name was not provided"
return 1
fi
if [ -z $2 ]
then
echo "Runtime platform version was not provided"
return 1
fi
PLATFORM_NAME=$1
PLATFORM_VERSION=$2
if [ "$PLATFORM_NAME" == "dotnetcore" ]
then
case $PLATFORM_VERSION in
8.0)
FULL_RUNTIME_TAG_VERSION=$NET_CORE_APP_80
;;
7.0)
FULL_RUNTIME_TAG_VERSION=$NET_CORE_APP_70
;;
6.0)
FULL_RUNTIME_TAG_VERSION=$NET_CORE_APP_60
;;
5.0)
FULL_RUNTIME_TAG_VERSION=$NET_CORE_APP_50
;;
3.1)
FULL_RUNTIME_TAG_VERSION=$NET_CORE_APP_31
;;
3.0)
FULL_RUNTIME_TAG_VERSION=$NET_CORE_APP_30
;;
*)
FULL_RUNTIME_TAG_VERSION=$PLATFORM_VERSION
;;
esac
elif [ "$PLATFORM_NAME" == "node" ]
then
case $PLATFORM_VERSION in
20)
FULL_RUNTIME_TAG_VERSION=$NODE20_VERSION
;;
18)
FULL_RUNTIME_TAG_VERSION=$NODE18_VERSION
;;
16)
FULL_RUNTIME_TAG_VERSION=$NODE16_VERSION
;;
14)
FULL_RUNTIME_TAG_VERSION=$NODE14_VERSION
;;
*)
FULL_RUNTIME_TAG_VERSION=$PLATFORM_VERSION
;;
esac
elif [ "$PLATFORM_NAME" == "php" ]
then
case $PLATFORM_VERSION in
8.3)
FULL_RUNTIME_TAG_VERSION=$PHP83_VERSION
;;
8.2)
FULL_RUNTIME_TAG_VERSION=$PHP82_VERSION
;;
8.1)
FULL_RUNTIME_TAG_VERSION=$PHP81_VERSION
;;
8.0)
FULL_RUNTIME_TAG_VERSION=$PHP80_VERSION
;;
7.4)
FULL_RUNTIME_TAG_VERSION=$PHP80_VERSION
;;
*)
FULL_RUNTIME_TAG_VERSION=$PLATFORM_VERSION
;;
esac
elif [ "$PLATFORM_NAME" == "python" ]
then
case $PLATFORM_VERSION in
3.12)
FULL_RUNTIME_TAG_VERSION=$PYTHON312_VERSION
;;
3.11)
FULL_RUNTIME_TAG_VERSION=$PYTHON311_VERSION
;;
3.10)
FULL_RUNTIME_TAG_VERSION=$PYTHON310_VERSION
;;
3.9)
FULL_RUNTIME_TAG_VERSION=$PYTHON39_VERSION
;;
3.8)
FULL_RUNTIME_TAG_VERSION=$PYTHON38_VERSION
;;
3.7)
FULL_RUNTIME_TAG_VERSION=$PYTHON37_VERSION
;;
*)
FULL_RUNTIME_TAG_VERSION=$PLATFORM_VERSION
;;
esac
elif [ "$PLATFORM_NAME" == "ruby" ]
then
case $PLATFORM_VERSION in
2.7)
FULL_RUNTIME_TAG_VERSION=$RUBY27_VERSION
;;
2.6)
FULL_RUNTIME_TAG_VERSION=$RUBY26_VERSION
;;
2.5)
FULL_RUNTIME_TAG_VERSION=$RUBY25_VERSION
;;
*)
FULL_RUNTIME_TAG_VERSION=$PLATFORM_VERSION
;;
esac
else
echo "Unable to retrieve version from the provided runtime platform name '$PLATFORM_NAME'"
return 1
fi
return 0
}
# https://medium.com/@Drew_Stokes/bash-argument-parsing-54f3b81a6a8f
PARAMS=""
while (( "$#" )); do
case "$1" in
-s|--sdk-storage-account-url)
sdkStorageAccountUrl=$2
shift 2
;;
--) # end argument parsing
shift
break
;;
-*|--*=) # unsupported flags
echo "Error: Unsupported flag $1" >&2
exit 1
;;
*) # preserve positional arguments
PARAMS="$PARAMS $1"
shift
;;
esac
done
# set positional arguments in their proper place
eval set -- "$PARAMS"
if [ -z "$sdkStorageAccountUrl" ]; then
sdkStorageAccountUrl=$PROD_SDK_CDN_STORAGE_BASE_URL
fi
# checking and retrieving token for the `oryxsdksstaging` account.
retrieveSastokenFromKeyVault $sdkStorageAccountUrl
echo
echo "SDK storage account url set to: $sdkStorageAccountUrl"
runtimeImagesSourceDir="$RUNTIME_IMAGES_SRC_DIR"
runtimeSubDir=""
runtimeImageDebianFlavor="buster"
if [ $# -eq 2 ]
then
echo "Locally building runtime '$runtimeSubDir'"
runtimeSubDir="$1"
runtimeImageDebianFlavor="$2"
elif [ $# -eq 1 ]
then
echo "CI Agent building runtime '$runtimeSubDir'"
runtimeImageDebianFlavor="$1"
fi
echo "Setting environment variable 'ORYX_RUNTIME_DEBIAN_FLAVOR' to provided value '$runtimeImageDebianFlavor'."
export ORYX_RUNTIME_DEBIAN_FLAVOR="$runtimeImageDebianFlavor"
if [ ! -z "$runtimeSubDir" ]
then
runtimeImagesSourceDir="$runtimeImagesSourceDir/$runtimeSubDir"
if [ ! -d "$runtimeImagesSourceDir" ]; then
(>&2 echo "Unknown runtime '$runtimeSubDir'")
exit 1
fi
fi
labels="--label com.microsoft.oryx.git-commit=$GIT_COMMIT"
labels="$labels --label com.microsoft.oryx.build-number=$BUILD_NUMBER"
labels="$labels --label com.microsoft.oryx.release-tag-name=$RELEASE_TAG_NAME"
# Avoid causing cache invalidation with the following check
if [ "$EMBED_BUILDCONTEXT_IN_IMAGES" == "true" ]
then
args="--build-arg GIT_COMMIT=$GIT_COMMIT"
args="$args --build-arg BUILD_NUMBER=$BUILD_NUMBER"
args="$args --build-arg RELEASE_TAG_NAME=$RELEASE_TAG_NAME"
fi
# Build the common base image first, so other images that depend on it get the latest version.
# We don't retrieve this image from a repository but rather build locally to make sure we get
# the latest version of its own base image.
docker build \
--pull \
-f "$RUNTIME_BASE_IMAGE_DOCKERFILE_PATH" \
-t "oryxdevmcr.azurecr.io/private/oryx/$RUNTIME_BASE_IMAGE_NAME-buster" \
--build-arg DEBIAN_FLAVOR=buster \
$REPO_DIR
docker build \
--pull \
-f "$RUNTIME_BASE_IMAGE_DOCKERFILE_PATH" \
-t "oryxdevmcr.azurecr.io/private/oryx/$RUNTIME_BASE_IMAGE_NAME-bullseye" \
--build-arg DEBIAN_FLAVOR=bullseye \
$REPO_DIR
docker build \
--pull \
-f "$RUNTIME_BASE_IMAGE_DOCKERFILE_PATH" \
-t "oryxdevmcr.azurecr.io/private/oryx/$RUNTIME_BASE_IMAGE_NAME-bookworm" \
--build-arg DEBIAN_FLAVOR=bookworm \
$REPO_DIR
execAllGenerateDockerfiles "$runtimeImagesSourceDir" "generateDockerfiles.sh" "$runtimeImageDebianFlavor"
# The common base image is built separately, so we ignore it
dockerFiles=$(find $runtimeImagesSourceDir -type f \( -name "$runtimeImageDebianFlavor.Dockerfile" ! -path "$RUNTIME_IMAGES_SRC_DIR/commonbase/*" \) )
if [ -z "$dockerFiles" ]
then
echo "Couldn't find any Dockerfiles under '$runtimeImagesSourceDir' and its sub-directories."
exit 1
fi
# Write the list of images that were built to artifacts folder
mkdir -p "$ARTIFACTS_DIR/images"
if [ "$AGENT_BUILD" == "true" ]
then
# clear existing contents of the file, if any
> $ACR_RUNTIME_IMAGES_ARTIFACTS_FILE.$runtimeImageDebianFlavor.txt
fi
for dockerFile in $dockerFiles; do
dockerFileDir=$(dirname "${dockerFile}")
# get tag name without os type first, so we can extract platform name and version
getTagName $dockerFileDir
IFS=':' read -ra PARTS <<< "$getTagName_result"
platformName="${PARTS[0]}"
platformVersion="${PARTS[1]}"
# Get the full platform version for an alternative tag (used for patching)
getRuntimeTagVersion $platformName $platformVersion
if shouldStageRuntimeVersion $platformName $platformVersion ; then
# Set $localImageTagName to the following format: oryxdevmcr.azurecr.io/staging/oryx/{platformName}:{platformVersion}-{osType}
localImageTagName="$ACR_STAGING_PREFIX/$platformName:$platformVersion-debian-$runtimeImageDebianFlavor"
else
# Set $localImageTagName to the following format: oryxdevmcr.azurecr.io/public/oryx/{platformName}:{platformVersion}-{osType}
localImageTagName="$ACR_PUBLIC_PREFIX/$platformName:$platformVersion-debian-$runtimeImageDebianFlavor"
fi
echo
echo "Building image '$localImageTagName' for Dockerfile located at '$dockerFile'..."
cd $REPO_DIR
echo
# pass in env var as a secret, which is mounted during a single run command of the build
# https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#secret
DOCKER_BUILDKIT=1 docker build -f $dockerFile \
-t $localImageTagName \
--build-arg AI_CONNECTION_STRING=$APPLICATION_INSIGHTS_CONNECTION_STRING \
--build-arg SDK_STORAGE_ENV_NAME=$SDK_STORAGE_BASE_URL_KEY_NAME \
--build-arg SDK_STORAGE_BASE_URL_VALUE=$sdkStorageAccountUrl \
--build-arg DEBIAN_FLAVOR=$runtimeImageDebianFlavor \
--build-arg USER_DOTNET_AI_VERSION=$USER_DOTNET_AI_VERSION \
--secret id=oryx_sdk_storage_account_access_token,env=ORYX_SDK_STORAGE_ACCOUNT_ACCESS_TOKEN \
$args \
$labels \
.
echo
echo "'$localImageTagName' image history:"
docker history $localImageTagName
echo
echo "$localImageTagName" >> $ACR_RUNTIME_IMAGES_ARTIFACTS_FILE.$runtimeImageDebianFlavor.txt
# Retag to include the full runtime platform version found (for patching)
if [ "$FULL_RUNTIME_TAG_VERSION" != "$platformVersion" ]; then
if shouldStageRuntimeVersion $platformName $platformVersion ; then
# Set $altLocalImageTagName to the following format: oryxdevmcr.azurecr.io/staging/oryx/{platformName}:{fullPlatformVersion}-{osType}
altLocalImageTagName="$ACR_STAGING_PREFIX/$platformName:$FULL_RUNTIME_TAG_VERSION-debian-$runtimeImageDebianFlavor"
else
# Set $altLocalImageTagName to the following format: oryxdevmcr.azurecr.io/public/oryx/{platformName}:{fullPlatformVersion}-{osType}
altLocalImageTagName="$ACR_PUBLIC_PREFIX/$platformName:$FULL_RUNTIME_TAG_VERSION-debian-$runtimeImageDebianFlavor"
fi
echo
echo "Tagging image '$localImageTagName' with alternative tag '$altLocalImageTagName' to include full platform version..."
docker tag "$localImageTagName" "$altLocalImageTagName"
echo "$altLocalImageTagName" >> $ACR_RUNTIME_IMAGES_ARTIFACTS_FILE.$runtimeImageDebianFlavor.txt
fi
# Retag image with build number (for images built in buildAgent)
if [ "$AGENT_BUILD" == "true" ]
then
# $uniqueTag will follow a similar format to Oryx-CI.20191028.1
# $BUILD_DEFINITIONNAME is the name of the build (e.g., Oryx-CI)
# $RELEASE_TAG_NAME is either the date of the build if the branch is master/main, or
# the name of the branch the build is against
uniqueTag="$BUILD_DEFINITIONNAME.$RELEASE_TAG_NAME"
if shouldStageRuntimeVersion $platformName $platformVersion ; then
# Set $acrRuntimeImageTagNameRepo to the following format: oryxdevmcr.azurecr.io/staging/oryx/{platformName}:{platformVersion}
acrRuntimeImageTagNameRepo="$ACR_STAGING_PREFIX/$getTagName_result"
else
# Set $acrRuntimeImageTagNameRepo to the following format: oryxdevmcr.azurecr.io/public/oryx/{platformName}:{platformVersion}
acrRuntimeImageTagNameRepo="$ACR_PUBLIC_PREFIX/$getTagName_result"
fi
# Tag the image to follow a similar format to .../python:3.8-debian-bullseye-Oryx-CI.20230828.1
acrRuntimeImageUniqueTag="$acrRuntimeImageTagNameRepo-debian-$runtimeImageDebianFlavor-$uniqueTag"
docker tag "$localImageTagName" "$acrRuntimeImageUniqueTag"
# add new content
echo
echo "Updating runtime image artifacts file with build number..."
echo "$acrRuntimeImageUniqueTag" >> $ACR_RUNTIME_IMAGES_ARTIFACTS_FILE.$runtimeImageDebianFlavor.txt
else
devBoxRuntimeImageTagNameRepo="$DEVBOX_RUNTIME_IMAGES_REPO_PREFIX/$getTagName_result"
docker tag "$localImageTagName" "$devBoxRuntimeImageTagNameRepo-debian-$runtimeImageDebianFlavor"
fi
cd $RUNTIME_IMAGES_SRC_DIR
done
if [ "$AGENT_BUILD" == "true" ]
then
echo
echo "List of images tagged (from '$ACR_RUNTIME_IMAGES_ARTIFACTS_FILE.$runtimeImageDebianFlavor.txt'):"
cat $ACR_RUNTIME_IMAGES_ARTIFACTS_FILE.$runtimeImageDebianFlavor.txt
fi
echo
showDockerImageSizes
echo
dockerCleanupIfRequested

Просмотреть файл

@ -1,51 +0,0 @@
#!/bin/bash
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
# --------------------------------------------------------------------------------------------
# This script calculates container sizes after building a sample app with a given image.
#
# Input: docker image that should be used to base the containers off of
# Output: A file that contains the names of the sample apps used, and the size of the container
# after the sample app was built.
set -e
declare -r REPO_DIR=$( cd $( dirname "$0" ) && cd .. && pwd )
dockerImage=$1
function buildSampleAppAndCalculateSize() {
platform=$1
sampleApp=$2
name="sample-app-$sampleApp"
echo
echo "Creating container for $platform/$sampleApp with name $name..."
docker run --name $name -v "/$REPO_DIR/tests/SampleApps/$platform/$sampleApp://app" $dockerImage oryx build //app >/dev/null 2>&1
docker ps --size -as -f "name=$name" --format "$platform/$sampleApp size: {{.Size}}" >> $resultFileName
echo "Finished. Removing container $name..."
docker rm $name >/dev/null 2>&1
}
resultFileName="/tmp/sample-app-container-sizes.txt"
echo "Container sizes being written to output file: $resultFileName"
echo "Sample app container sizes for $dockerImage" > $resultFileName
echo "-------------------------------------------" >> $resultFileName
buildSampleAppAndCalculateSize "DotNetCore" "NetCoreApp31.MvcApp"
buildSampleAppAndCalculateSize "golang" "hello-world"
buildSampleAppAndCalculateSize "hugo" "hugo-sample"
buildSampleAppAndCalculateSize "java" "MavenSimpleJavaApp"
buildSampleAppAndCalculateSize "nodejs" "helloworld-nuxtjs"
buildSampleAppAndCalculateSize "php" "greetings"
buildSampleAppAndCalculateSize "python" "flask-app"
buildSampleAppAndCalculateSize "ruby" "Jekyll-app"
echo
echo "Finished all sample apps. Printing contents of output file $resultFileName..."
echo
echo
cat $resultFileName

Просмотреть файл

@ -1,22 +0,0 @@
#!/bin/bash
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
# --------------------------------------------------------------------------------------------
set -e
declare -r REPO_DIR=$( cd $( dirname "$0" ) && cd .. && pwd )
cd $REPO_DIR
# Get comma separated list of all constants files
constantsFiles=$(find "$REPO_DIR/build" -type f -name '*constants.yaml' -o -name '*constants.yml')
constantsFiles=$(echo $constantsFiles | tr ' ' ,)
dotnet run \
--no-launch-profile \
--project $REPO_DIR/build/tools/SharedCodeGenerator/SharedCodeGenerator.csproj \
-- \
"$constantsFiles" \
"$REPO_DIR"

Просмотреть файл

@ -1,79 +0,0 @@
#!/bin/bash
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
# --------------------------------------------------------------------------------------------
set -e
declare -r REPO_DIR=$( cd $( dirname "$0" ) && cd .. && pwd )
declare -r buildBuildImagesScript="$REPO_DIR/build/buildBuildImages.sh"
declare -r testProjectName="Oryx.BuildImage.Tests"
# Load all variables
source $REPO_DIR/build/__variables.sh
source $REPO_DIR/build/__sdkStorageConstants.sh
if [ "$1" = "skipBuildingImages" ]
then
echo
echo "Skipping building build images as argument '$1' was passed..."
else
echo
echo "Invoking script '$buildBuildImagesScript'..."
$buildBuildImagesScript -s $ORYX_TEST_SDK_STORAGE_URL "$0"
fi
if [ -n "$2" ]
then
echo
echo "Setting environment variable 'ORYX_TEST_IMAGE_BASE' to provided value '$2'."
export ORYX_TEST_IMAGE_BASE="$2"
fi
if [ -n "$3" ]
then
echo
echo "Setting environment variable 'ORYX_TEST_TAG_SUFFIX' to provided value '$3'."
export ORYX_TEST_TAG_SUFFIX="-$3"
fi
if [ -n "$4" ]
then
echo
echo "Setting environment variable 'ORYX_TEST_IMAGE_TYPE' to provided value '$4'."
export ORYX_TEST_IMAGE_TYPE="$4"
fi
echo
echo "Building and running tests..."
cd "$TESTS_SRC_DIR/$testProjectName"
artifactsDir="$REPO_DIR/artifacts"
mkdir -p "$artifactsDir"
# Create a directory to capture any debug logs that MSBuild generates
msbuildDebugLogsDir="$artifactsDir/msbuildDebugLogs"
mkdir -p "$msbuildDebugLogsDir"
export MSBUILDDEBUGPATH="$msbuildDebugLogsDir"
# Enable automatic creation of crash dump when a .NET Core process crashes (ex: TestHost)
export COMPlus_DbgEnableMiniDump="1"
export COMPlus_DbgMiniDumpName="$ARTIFACTS_DIR/$testProjectName-dump.%d"
diagnosticFileLocation="$artifactsDir/$testProjectName-log.txt"
dotnet test \
--blame \
--diag "$diagnosticFileLocation" \
--filter "category=${ORYX_TEST_IMAGE_TYPE}" \
--verbosity normal \
--test-adapter-path:. \
--logger:"xunit;LogFilePath=$ARTIFACTS_DIR\testResults\\$testProjectName.xml" \
-c $BUILD_CONFIGURATION
# --blame flag generates an xml file which it drops under the project directory.
# Copy that file to artifacts directory too
if [ -d "TestResults" ]; then
resultsDir="$ARTIFACTS_DIR/$testProjectName.TestResults"
mkdir -p "$resultsDir"
cp -rf TestResults/. "$resultsDir/"
fi

Просмотреть файл

@ -1,57 +0,0 @@
#!/bin/bash
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
# --------------------------------------------------------------------------------------------
set -e
declare -r REPO_DIR=$( cd $( dirname "$0" ) && cd .. && pwd )
# Load all variables
source $REPO_DIR/build/__variables.sh
# A hint to Detector.csproj file to generate the nuget package in a specific way so that
# test projects can restore it
export CREATE_PACKAGE_FOR_TESTS="true"
echo
echo "Building and running tests..."
testProjectName="Detector.Tests"
echo
echo "Running tests in project '$testProjectName'..."
echo
cd "$TESTS_SRC_DIR/$testProjectName"
mkdir -p "$ARTIFACTS_DIR"
dotnet test \
--test-adapter-path:. \
--logger:"xunit;LogFilePath=$ARTIFACTS_DIR\testResults\\$testProjectName.xml" \
-c $BUILD_CONFIGURATION \
| sed 's/^/ /'
testProjectName="Detector.NuGetPackage.Tests"
export NUGET_PACKAGES="$REPO_DIR/tests/$testProjectName/.package-cache"
echo
echo "Deleting existing Detector packages from cache..."
shopt -s nocaseglob
rm -rf "$NUGET_PACKAGES/Microsoft.Oryx.Detector"
echo
echo "Running tests in project '$testProjectName'..."
echo
cd "$TESTS_SRC_DIR/$testProjectName"
dotnet test \
--test-adapter-path:. \
--logger:"xunit;LogFilePath=$ARTIFACTS_DIR\testResults\\$testProjectName.xml" \
-c $BUILD_CONFIGURATION \
| sed 's/^/ /'
# --blame flag generates an xml file which it drops under the project directory.
# Copy that file to artifacts directory too
if [ -d "TestResults" ]; then
resultsDir="$ARTIFACTS_DIR/$testProjectName.TestResults"
mkdir -p "$resultsDir"
cp -rf TestResults/. "$resultsDir/"
fi

Просмотреть файл

@ -1,78 +0,0 @@
#!/bin/bash
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
# --------------------------------------------------------------------------------------------
set -e
declare -r REPO_DIR=$( cd $( dirname "$0" ) && cd .. && pwd )
declare -r buildRuntimeImagesScript="$REPO_DIR/build/buildRunTimeImages.sh"
declare -r testProjectName="Oryx.RuntimeImage.Tests"
# Load all variables
source $REPO_DIR/build/__variables.sh
source $REPO_DIR/build/__sdkStorageConstants.sh
if [ "$1" = "skipBuildingImages" ]
then
echo
echo "Skipping building runtime images as argument '$1' was passed..."
else
echo
echo "Invoking script '$buildRuntimeImagesScript'..."
$buildRuntimeImagesScript -s $ORYX_TEST_SDK_STORAGE_URL "$@"
fi
if [ -n "$2" ]
then
echo
echo "Setting environment variable 'ORYX_TEST_IMAGE_BASE' to provided value '$2'."
export ORYX_TEST_IMAGE_BASE="$2"
fi
if [ -n "$3" ]
then
echo
echo "Setting environment variable 'ORYX_TEST_TAG_SUFFIX' to provided value '$3'."
export ORYX_TEST_TAG_SUFFIX="-$3"
fi
if [ -n "$4" ]; then
testCaseFilter="--filter $4"
echo "Running runtime image tests with filter '$testCaseFilter'..."
else
echo "Running all runtime image tests..."
fi
echo
echo "Building and running tests..."
cd "$TESTS_SRC_DIR/$testProjectName"
artifactsDir="$REPO_DIR/artifacts"
mkdir -p "$artifactsDir"
# Create a directory to capture any debug logs that MSBuild generates
msbuildDebugLogsDir="$artifactsDir/msbuildDebugLogs"
mkdir -p "$msbuildDebugLogsDir"
export MSBUILDDEBUGPATH="$msbuildDebugLogsDir"
# Enable automatic creation of crash dump when a .NET Core process crashes (ex: TestHost)
export COMPlus_DbgEnableMiniDump="1"
export COMPlus_DbgMiniDumpName="$ARTIFACTS_DIR/$testProjectName-dump.%d"
diagnosticFileLocation="$artifactsDir/$testProjectName-log.txt"
dotnet test \
--blame \
--diag "$diagnosticFileLocation" \
$testCaseFilter \
--test-adapter-path:. \
--logger:"xunit;LogFilePath=$ARTIFACTS_DIR\testResults\\$testProjectName.xml" \
-c $BUILD_CONFIGURATION
# --blame flag generates an xml file which it drops under the project directory.
# Copy that file to artifacts directory too
if [ -d "TestResults" ]; then
resultsDir="$ARTIFACTS_DIR/$testProjectName.TestResults"
mkdir -p "$resultsDir"
cp -rf TestResults/. "$resultsDir/"
fi

Просмотреть файл

@ -640,6 +640,7 @@
- 18.19.0 - 18.19.0
- 18.19.1 - 18.19.1
- 18.20.3 - 18.20.3
- 18.20.4
- 20.9.0 - 20.9.0
- 20.11.0 - 20.11.0
- 20.11.1 - 20.11.1

Просмотреть файл

@ -80,15 +80,19 @@ RUN set -ex \
ARG IMAGES_DIR="/opt/tmp/images" ARG IMAGES_DIR="/opt/tmp/images"
ARG BUILD_DIR="/opt/tmp/build" ARG BUILD_DIR="/opt/tmp/build"
COPY images/yarn-v1.22.15.tar.gz . ARG YARN_VERSION
ARG YARN_MINOR_VERSION
ARG YARN_MAJOR_VERSION
COPY images/yarn-v$YARN_VERSION.tar.gz .
RUN set -e \ RUN set -e \
&& yarnCacheFolder="/usr/local/share/yarn-cache" \ && yarnCacheFolder="/usr/local/share/yarn-cache" \
&& mkdir -p $yarnCacheFolder \ && mkdir -p $yarnCacheFolder \
&& chmod 777 $yarnCacheFolder \ && chmod 777 $yarnCacheFolder \
&& mkdir -p /opt/yarn \ && mkdir -p /opt/yarn \
&& tar -xzf yarn-v1.22.15.tar.gz -C /opt/yarn \ && tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/yarn \
&& mv /opt/yarn/yarn-v1.22.15 /opt/yarn/1.22.15 \ && mv /opt/yarn/yarn-v$YARN_VERSION /opt/yarn/$YARN_VERSION \
&& rm yarn-v1.22.15.tar.gz && rm yarn-v$YARN_VERSION.tar.gz
COPY nodejs-${DEBIAN_FLAVOR}-16.20.0.tar.gz . COPY nodejs-${DEBIAN_FLAVOR}-16.20.0.tar.gz .
RUN set -e \ RUN set -e \
@ -98,7 +102,6 @@ RUN set -e \
&& ln -sfn "/opt/nodejs/16.20.0" "/opt/nodejs/16.20" && ln -sfn "/opt/nodejs/16.20.0" "/opt/nodejs/16.20"
RUN set -ex \ RUN set -ex \
&& . ${BUILD_DIR}/__nodeVersions.sh \
&& ln -s $YARN_VERSION /opt/yarn/stable \ && ln -s $YARN_VERSION /opt/yarn/stable \
&& ln -s $YARN_VERSION /opt/yarn/latest \ && ln -s $YARN_VERSION /opt/yarn/latest \
&& ln -s $YARN_VERSION /opt/yarn/$YARN_MINOR_VERSION \ && ln -s $YARN_VERSION /opt/yarn/$YARN_MINOR_VERSION \

Просмотреть файл

@ -114,23 +114,25 @@ RUN apt-get update \
&& echo "cli-builder" > /opt/oryx/.imagetype \ && echo "cli-builder" > /opt/oryx/.imagetype \
&& echo "DEBIAN|${DEBIAN_FLAVOR}" | tr '[a-z]' '[A-Z]' > /opt/oryx/.ostype && echo "DEBIAN|${DEBIAN_FLAVOR}" | tr '[a-z]' '[A-Z]' > /opt/oryx/.ostype
ARG YARN_VERSION
ARG YARN_MINOR_VERSION
ARG YARN_MAJOR_VERSION
# Install Hugo and Yarn for node applications # Install Hugo and Yarn for node applications
ARG BUILD_DIR="/opt/tmp/build" ARG BUILD_DIR="/opt/tmp/build"
ARG IMAGES_DIR="/opt/tmp/images" ARG IMAGES_DIR="/opt/tmp/images"
RUN ${IMAGES_DIR}/build/installHugo.sh RUN ${IMAGES_DIR}/build/installHugo.sh
COPY images/yarn-v1.22.15.tar.gz . COPY images/yarn-v$YARN_VERSION.tar.gz .
RUN set -ex \ RUN set -ex \
&& yarnCacheFolder="/usr/local/share/yarn-cache" \ && yarnCacheFolder="/usr/local/share/yarn-cache" \
&& mkdir -p $yarnCacheFolder \ && mkdir -p $yarnCacheFolder \
&& chmod 777 $yarnCacheFolder \ && chmod 777 $yarnCacheFolder \
&& . ${BUILD_DIR}/__nodeVersions.sh \
&& mkdir -p /opt/yarn \ && mkdir -p /opt/yarn \
&& tar -xzf yarn-v1.22.15.tar.gz -C /opt/yarn \ && tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/yarn \
&& mv /opt/yarn/yarn-v1.22.15 /opt/yarn/1.22.15 \ && mv /opt/yarn/yarn-v$YARN_VERSION /opt/yarn/$YARN_VERSION \
&& rm yarn-v1.22.15.tar.gz && rm yarn-v$YARN_VERSION.tar.gz
RUN set -ex \ RUN set -ex \
&& . ${BUILD_DIR}/__nodeVersions.sh \
&& ln -s $YARN_VERSION /opt/yarn/stable \ && ln -s $YARN_VERSION /opt/yarn/stable \
&& ln -s $YARN_VERSION /opt/yarn/latest \ && ln -s $YARN_VERSION /opt/yarn/latest \
&& ln -s $YARN_VERSION /opt/yarn/$YARN_MINOR_VERSION \ && ln -s $YARN_VERSION /opt/yarn/$YARN_MINOR_VERSION \

Просмотреть файл

@ -138,19 +138,21 @@ COPY --from=buildscriptgenerator /opt/buildscriptgen/ /opt/buildscriptgen/
RUN ${IMAGES_DIR}/build/installHugo.sh RUN ${IMAGES_DIR}/build/installHugo.sh
COPY images/yarn-v1.22.15.tar.gz . ARG YARN_VERSION
ARG YARN_MINOR_VERSION
ARG YARN_MAJOR_VERSION
COPY images/yarn-v$YARN_VERSION.tar.gz .
RUN set -ex \ RUN set -ex \
&& yarnCacheFolder="/usr/local/share/yarn-cache" \ && yarnCacheFolder="/usr/local/share/yarn-cache" \
&& mkdir -p $yarnCacheFolder \ && mkdir -p $yarnCacheFolder \
&& chmod 777 $yarnCacheFolder \ && chmod 777 $yarnCacheFolder \
&& . ${BUILD_DIR}/__nodeVersions.sh \
&& mkdir -p /opt/yarn \ && mkdir -p /opt/yarn \
&& tar -xzf yarn-v1.22.15.tar.gz -C /opt/yarn \ && tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/yarn \
&& mv /opt/yarn/yarn-v1.22.15 /opt/yarn/1.22.15 \ && mv /opt/yarn/yarn-v$YARN_VERSION /opt/yarn/$YARN_VERSION \
&& rm yarn-v1.22.15.tar.gz && rm yarn-v$YARN_VERSION.tar.gz
RUN set -ex \ RUN set -ex \
&& . ${BUILD_DIR}/__nodeVersions.sh \
&& ln -s $YARN_VERSION /opt/yarn/stable \ && ln -s $YARN_VERSION /opt/yarn/stable \
&& ln -s $YARN_VERSION /opt/yarn/latest \ && ln -s $YARN_VERSION /opt/yarn/latest \
&& ln -s $YARN_VERSION /opt/yarn/$YARN_MINOR_VERSION \ && ln -s $YARN_VERSION /opt/yarn/$YARN_MINOR_VERSION \

Просмотреть файл

@ -0,0 +1,72 @@
#!/bin/bash
if ! command -v yq &> /dev/null
then
echo "yq could not be found, installing..."
sudo apt-get update
sudo apt-get install -y yq
fi
constants_yaml_file="./images/constants.yml"
# Get the absolute path
absolute_path=$(realpath "$constants_yaml_file")
# Print the absolute path to verify
echo "The absolute path to the YAML file is: $absolute_path"
declare -r REPO_DIR=$(cd images && pwd)
keys=$(yq e '.variables | keys' $constants_yaml_file | sed 's/^[- ]*//g')
for key in $keys; do
value=$(yq e ".variables.$key" $constants_yaml_file)
export $key=$value
done
# Update package list and install .NET SDK
sudo apt-get update
sudo apt-get install -y dotnet-sdk-7.0
# build_image is githubactions, jamstack, cli
build_image=$1;
debian_flavor=$2;
set -ex
echo "current directory: $(pwd)"
dotnet publish ./src/BuildScriptGeneratorCli/BuildScriptGeneratorCli.csproj --configuration Release --output binaries --runtime linux-x64 --self-contained
dotnet publish ./src/BuildServer/BuildServer.csproj --configuration Release --output binaries --runtime linux-x64 --self-contained
case $build_image in
"githubactions")
case $debian_flavor in
"buster")
docker build -f ./images/build/Dockerfiles/gitHubActions.Dockerfile -t githubactions_image_$debian_flavor --build-arg BASE_IMAGE=$GitHubActions_BaseImage_Buster --build-arg YARN_VERSION=$YARN_VERSION --build-arg YARN_MINOR_VERSION=$YARN_MINOR_VERSION --build-arg YARN_MAJOR_VERSION=$YARN_MAJOR_VERSION --build-arg DEBIAN_FLAVOR=$debian_flavor .
;;
"bullseye")
docker build -f ./images/build/Dockerfiles/gitHubActions.Dockerfile -t githubactions_image_$debian_flavor --build-arg BASE_IMAGE=$GitHubActions_BaseImage_Bullseye --build-arg YARN_VERSION=$YARN_VERSION --build-arg YARN_MINOR_VERSION=$YARN_MINOR_VERSION --build-arg YARN_MAJOR_VERSION=$YARN_MAJOR_VERSION --build-arg DEBIAN_FLAVOR=$debian_flavor .
;;
"bookworm")
docker build -f ./images/build/Dockerfiles/gitHubActions.Dockerfile -t githubactions_image_$debian_flavor --build-arg BASE_IMAGE=$GitHubActions_BaseImage_Bookworm --build-arg YARN_VERSION=$YARN_VERSION --build-arg YARN_MINOR_VERSION=$YARN_MINOR_VERSION --build-arg YARN_MAJOR_VERSION=$YARN_MAJOR_VERSION --build-arg DEBIAN_FLAVOR=$debian_flavor --build-arg AI_CONNECTION_STRING=$AI_CONNECTION_STRING --build-arg SDK_STORAGE_BASE_URL_VALUE=$SDK_STORAGE_BASE_URL_VALUE .
;;
esac
;;
"jamstack")
docker build -f ./images/build/Dockerfiles/cli.Dockerfile -t cli_image_$debian_flavor --build-arg DEBIAN_FLAVOR=$debian_flavor --build-arg AI_CONNECTION_STRING=$AI_CONNECTION_STRING --build-arg SDK_STORAGE_BASE_URL_VALUE=$SDK_STORAGE_BASE_URL_VALUE .
docker build -f ./images/build/Dockerfiles/azureFunctions.JamStack.Dockerfile -t jamstack_image_$debian_flavor --build-arg PYTHON38_VERSION=$python38Version --build-arg DEBIAN_FLAVOR=$debian_flavor --build-arg AI_CONNECTION_STRING=$AI_CONNECTION_STRING --build-arg SDK_STORAGE_BASE_URL_VALUE=$SDK_STORAGE_BASE_URL_VALUE --build-arg BASE_IMAGE="docker.io/library/cli_image_$debian_flavor" --build-arg YARN_VERSION=$YARN_VERSION --build-arg YARN_MINOR_VERSION=$YARN_MINOR_VERSION --build-arg YARN_MAJOR_VERSION=$YARN_MAJOR_VERSION .
;;
"cli")
docker build -f ./images/build/Dockerfiles/cli.Dockerfile -t cli_image_$debian_flavor --build-arg DEBIAN_FLAVOR=$debian_flavor --build-arg AI_CONNECTION_STRING=$AI_CONNECTION_STRING --build-arg SDK_STORAGE_BASE_URL_VALUE=$SDK_STORAGE_BASE_URL_VALUE .
;;
esac

Просмотреть файл

@ -1,85 +0,0 @@
#!/bin/bash
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
# --------------------------------------------------------------------------------------------
set -ex
__CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
source "$__CURRENT_DIR/../../build/__dotNetCoreSdkVersions.sh"
source "$__CURRENT_DIR/../../build/__dotNetCoreRunTimeVersions.sh"
source "$__CURRENT_DIR/../../build/__finalStretchVersions.sh"
splitSdksDir="/opt/dotnet"
allSdksDir="/opt/dotnet/all"
mkdir -p "$allSdksDir"
# Get the latest (not 'lts') version of .NET Core SDK so that we can use the 'dotnet.exe' of that version
# as the muxer to switch between different versions of SDKs
currentMaxMajorVersion="0"
currentMaxMinorVersion="0"
currentMaxPatchVersion="0"
cd "$splitSdksDir"
integerRegex='^[0-9]+$'
for sdkDir in "$splitSdksDir"/*/
do
sdkDir=${sdkDir%*/}
sdkDirName=${sdkDir##*/}
IFS='.' read -ra SDK_VERSION_PARTS <<< "$sdkDirName"
majorVersion=${SDK_VERSION_PARTS[0]}
minorVersion=${SDK_VERSION_PARTS[1]:-0}
patchVersion=${SDK_VERSION_PARTS[2]}
# Ignore strings like 'lts'
if ! [[ $majorVersion =~ $integerRegex ]] ; then
continue
fi
if [ "$majorVersion" -gt "$currentMaxMajorVersion" ] || \
( [ "$majorVersion" -ge "$currentMaxMajorVersion" ] && \
[ "$minorVersion" -gt "$currentMaxMinorVersion" ] ); then
currentMaxMajorVersion=$majorVersion
currentMaxMinorVersion=$minorVersion
currentMaxPatchVersion=$patchVersion
fi
done
muxerVersion="$currentMaxMajorVersion.$currentMaxMinorVersion.$currentMaxPatchVersion"
echo "Using SDK version '$muxerVersion' for getting the muxer dotnet.exe..."
cp -f "$splitSdksDir/$muxerVersion/dotnet" "$allSdksDir"
cp -f "$splitSdksDir/$muxerVersion/LICENSE.txt" "$allSdksDir"
cp -f "$splitSdksDir/$muxerVersion/ThirdPartyNotices.txt" "$allSdksDir"
# Creates a structure which is how a typical .NET Core SDK install needs to be. Here we create only symlinks
# to existing split structure of SDKs.
function createLinks() {
local sdkVersion="$1"
local runtimeVersion="$2"
cd "$splitSdksDir/$sdkVersion"
# Find folders with name as sdk or runtime version
find . -name "$sdkVersion" -o -name "$runtimeVersion" | while read subPath; do
# Trim beginning 2 characters from the line which currently looks like, for example, './sdk/2.2.402'
subPath="${subPath:2}"
linkFrom="$allSdksDir/$subPath"
linkFromParentDir=$(dirname $linkFrom)
mkdir -p "$linkFromParentDir"
linkTo="$splitSdksDir/$sdkVersion/$subPath"
ln -s $linkTo $linkFrom
echo "Created link: $linkFrom ==> $linkTo"
done
}
createLinks "$FINAL_STRETCH_DOT_NET_CORE_31_SDK_VERSION" "$FINAL_STRETCH_NET_CORE_APP_31"
echo
createLinks "$DOT_NET_CORE_30_SDK_VERSION" "$NET_CORE_APP_30"
echo
createLinks "$DOT_NET_CORE_22_SDK_VERSION" "$NET_CORE_APP_22"
echo
createLinks "$DOT_NET_CORE_21_SDK_VERSION" "$NET_CORE_APP_21"

58
images/constants.yml Normal file
Просмотреть файл

@ -0,0 +1,58 @@
variables:
ASPNET_CORE_APP_60: 6.0.32
ASPNET_CORE_APP_60_SHA: 1849c0073f12477b94357a1afb1cbd4ad67764263528b66037c19d554df41e681e4b41c0804b106319fe661d0bc3bae9e29e4913c0d0df33861cf6f32ebaac96
ASPNET_CORE_APP_70: 7.0.20
ASPNET_CORE_APP_70_SHA: 62ed9743972043a72e48d5aa2f7fdf3483cf684a32b051315004d1c778e9712bf66e5e7a97a5a53993fa8e92daf5bacaf2cdb3eae44bb9a9e25532b9a80f4f70
ASPNET_CORE_APP_80: 8.0.7
ASPNET_CORE_APP_80_SHA: c7479dc008fce77c2bfcaa1ac1c9fe6f64ef7e59609fff6707da14975aade73e3cb22b97f2b3922a2642fa8d843a3caf714ab3a2b357abeda486b9d0f8bebb18
ASPNET_CORE_APP_90: 9.0.0-preview.6.24328.4
ASPNET_CORE_APP_90_SHA: 4e178bbd26c70a3f1690c2b84b01c5a43cbf546adc878617fdf4c39d10e8063684420126261aacabcaa7f72c697290c1c06d3e93d9f3babe57c72d5fe98346fb
NET_CORE_APP_60: 6.0.32
NET_CORE_APP_60_SHA: 9babfe66f4a4261dd454f3220899af0a19532ab93575b581cec838f1c5f130d98b6fb1aaae5ee8e5b2e70deb55b619a0d55347f014ace72cb84b78d61faf0a59
NET_CORE_APP_70: 7.0.20
NET_CORE_APP_70_SHA: 87855297338555a7b577d7e314e5dbf2c2350f8c867a489cd1e535634bad5c123a1871464d37fc9421837ff5d426c2eadecbe0f60bbf3fd32bc2461f47790a40
NET_CORE_APP_80: 8.0.7
NET_CORE_APP_80_SHA: 88e9ac34ad5ac76eec5499f2eb8d1aa35076518c842854ec1053953d34969c7bf1c5b2dbce245dbace3a18c3b8a4c79d2ef2d2ff105ce9d17cbbdbe813d8b16f
NET_CORE_APP_90: 9.0.0-preview.6.24327.7
NET_CORE_APP_90_SHA: 09aa8c4e6ae3ada1a265a5cd2b46779a763163e4dd9a1892b44606b89cf147339e10b7c584dbcaf5404af0553f0ef6c5801436c217f4fe1a5d3bdb6d74aef1d1
NODE_APP_INSIGHTS_SDK_VERSION: 1.8.7
node18Version: 18.20.4
node20Version: 20.15.1
NPM_VERSION: 10.7.0
php81Version: 8.1.29
php81Version_SHA: 288884af60581d4284baba2ace9ca6d646f72facbd3e3c2dd2acc7fe6f903536
php82Version: 8.2.21
php82Version_SHA: 8cc44d51bb2506399ec176f70fe110f0c9e1f7d852a5303a2cd1403402199707
php83Version: 8.3.9
php83Version_SHA: bf4d7b8ea60a356064f88485278bd6f941a230ec16f0fc401574ce1445ad6c77
PM2_VERSION: 5.3.1
python310Version: 3.10.14
python311Version: 3.11.8
python312Version: 3.12.2
python38Version: 3.8.19
python39Version: 3.9.19
YARN_MAJOR_VERSION: 1
YARN_MINOR_VERSION: 1.22
YARN_VERSION: 1.22.15
USER_DOTNET_AI_VERSION: 2.8.42
AI_CONNECTION_STRING: "1234(RANDOMVALUE)"
SDK_STORAGE_BASE_URL_VALUE: 'https://oryxsdksdev.blob.core.windows.net'
node18DebianFlavors: 'bullseye'
node20DebianFlavors: 'bullseye,bookworm'
python38DebianFlavors: 'buster,bullseye'
python39DebianFlavors: 'buster,bullseye'
python310DebianFlavors: 'buster,bullseye'
python311DebianFlavors: 'bullseye,bookworm'
python312DebianFlavors: 'bullseye,bookworm'
dotnet60DebianFlavors: 'buster,bullseye'
dotnet70DebianFlavors: 'buster,bullseye'
dotnet80DebianFlavors: 'bullseye,bookworm'
dotnet90DebianFlavors: 'bookworm'
php81DebianFlavors: 'bullseye,buster'
php82DebianFlavors: 'bullseye,buster'
php83DebianFlavors: 'bullseye,buster,bookworm'
DotNetCoreAgent_version: 2.8.42
GitHubActions_BaseImage_Buster: 'mcr.microsoft.com/mirror/docker/library/buildpack-deps@sha256:be7137ba47bdf421d3950abe1200322631e8db11b468cd6f0ebf3d687e556c90'
GitHubActions_BaseImage_Bullseye: 'mcr.microsoft.com/mirror/docker/library/buildpack-deps@sha256:25c86292946cce832340fe808ac47e5a845b68c488f177a47ff44fd59040397d'
GitHubActions_BaseImage_Bookworm: 'mcr.microsoft.com/mirror/docker/library/buildpack-deps@sha256:ff838f535d6e3bace9ab7eefa360d648ba529f9aa57fdd709335f8ef0516cdde'

Просмотреть файл

@ -0,0 +1,146 @@
#!/bin/bash
if ! command -v yq &> /dev/null
then
echo "yq could not be found, installing..."
sudo apt-get update
sudo apt-get install -y yq
fi
constants_yaml_file="./images/constants.yml"
# Get the absolute path
absolute_path=$(realpath "$constants_yaml_file")
# Print the absolute path to verify
echo "The absolute path to the YAML file is: $absolute_path"
declare -r REPO_DIR=$(cd images && pwd)
keys=$(yq e '.variables | keys' $constants_yaml_file | sed 's/^[- ]*//g')
for key in $keys; do
value=$(yq e ".variables.$key" $constants_yaml_file)
export $key=$value
done
stack_name=$1;
stack_version=$2;
debian_flavor=$3;
set -ex
# declare -r REPO_DIR=$(cd images && pwd)
echo "Current directory: $(pwd)"
# source $REPO_DIR/defaultVersions.sh
docker build -f ./images/runtime/commonbase/Dockerfile -t oryx_run_base_$debian_flavor --build-arg DEBIAN_FLAVOR=$debian_flavor .
case $stack_name in
"dotnet")
curl -SL --output "DotNetCoreAgent.$DotNetCoreAgent_version.zip" "https://oryxsdksdev.blob.core.windows.net/appinsights-agent/DotNetCoreAgent.$DotNetCoreAgent_version.zip"
case $stack_version in
"6.0")
docker build -f ./images/runtime/dotnetcore/6.0/$debian_flavor.Dockerfile -t dotnet6_image_$debian_flavor --build-arg NET_CORE_APP_60_SHA=$NET_CORE_APP_60_SHA --build-arg ASPNET_CORE_APP_60_SHA=$ASPNET_CORE_APP_60_SHA --build-arg NET_CORE_APP_60=$NET_CORE_APP_60 --build-arg ASPNET_CORE_APP_60=$ASPNET_CORE_APP_60 --build-arg USER_DOTNET_AI_VERSION=$USER_DOTNET_AI_VERSION --build-arg AI_CONNECTION_STRING=$AI_CONNECTION_STRING .
;;
"7.0")
docker build -f ./images/runtime/dotnetcore/7.0/$debian_flavor.Dockerfile -t dotnet7_image_$debian_flavor --build-arg NET_CORE_APP_70_SHA=$NET_CORE_APP_70_SHA --build-arg ASPNET_CORE_APP_70_SHA=$ASPNET_CORE_APP_70_SHA --build-arg NET_CORE_APP_70=$NET_CORE_APP_70 --build-arg ASPNET_CORE_APP_70=$ASPNET_CORE_APP_70 --build-arg USER_DOTNET_AI_VERSION=$USER_DOTNET_AI_VERSION --build-arg AI_CONNECTION_STRING=$AI_CONNECTION_STRING .
;;
"8.0")
docker build -f ./images/runtime/dotnetcore/8.0/$debian_flavor.Dockerfile -t dotnet8_image_$debian_flavor --build-arg NET_CORE_APP_80_SHA=$NET_CORE_APP_80_SHA --build-arg ASPNET_CORE_APP_80_SHA=$ASPNET_CORE_APP_80_SHA --build-arg NET_CORE_APP_80=$NET_CORE_APP_80 --build-arg ASPNET_CORE_APP_80=$ASPNET_CORE_APP_80 --build-arg USER_DOTNET_AI_VERSION=$USER_DOTNET_AI_VERSION --build-arg AI_CONNECTION_STRING=$AI_CONNECTION_STRING .
;;
"9.0")
docker build -f ./images/runtime/dotnetcore/9.0/$debian_flavor.Dockerfile -t dotnet9_image_$debian_flavor --build-arg NET_CORE_APP_90_SHA=$NET_CORE_APP_90_SHA --build-arg ASPNET_CORE_APP_90_SHA=$ASPNET_CORE_APP_90_SHA --build-arg NET_CORE_APP_90=$NET_CORE_APP_90 --build-arg ASPNET_CORE_APP_90=$ASPNET_CORE_APP_90 --build-arg USER_DOTNET_AI_VERSION=$USER_DOTNET_AI_VERSION --build-arg AI_CONNECTION_STRING=$AI_CONNECTION_STRING .
;;
esac
rm -f ./DotNetCoreAgent.2.8.42.zip
;;
"node")
docker build -f ./images/runtime/commonbase/nodeRuntimeBase.Dockerfile -t oryx_node_run_base_$debian_flavor --build-arg BASE_IMAGE="docker.io/library/oryx_run_base_$debian_flavor" .
case $stack_version in
"18")
curl -SL --output "nodejs-$debian_flavor-$node18Version.tar.gz" "https://oryxsdksdev.blob.core.windows.net/nodejs/nodejs-$debian_flavor-$node18Version.tar.gz"
docker build -f ./images/runtime/node/18/$debian_flavor.Dockerfile -t node18_$debian_flavor --build-arg NODE18_VERSION=$node18Version --build-arg BASE_IMAGE="docker.io/library/oryx_node_run_base_$debian_flavor" --build-arg NPM_VERSION=$NPM_VERSION --build-arg PM2_VERSION=$PM2_VERSION --build-arg NODE_APP_INSIGHTS_SDK_VERSION=$NODE_APP_INSIGHTS_SDK_VERSION --build-arg USER_DOTNET_AI_VERSION=$USER_DOTNET_AI_VERSION --build-arg AI_CONNECTION_STRING=$AI_CONNECTION_STRING .
rm -f ./nodejs-$debian_flavor-$node18Version.tar.gz
;;
"20")
curl -SL --output "nodejs-$debian_flavor-$node20Version.tar.gz" "https://oryxsdksdev.blob.core.windows.net/nodejs/nodejs-$debian_flavor-$node20Version.tar.gz"
docker build -f ./images/runtime/node/20/$debian_flavor.Dockerfile -t node20_$debian_flavor --build-arg NODE20_VERSION=$node20Version --build-arg BASE_IMAGE="docker.io/library/oryx_node_run_base_$debian_flavor" --build-arg NPM_VERSION=$NPM_VERSION --build-arg PM2_VERSION=$PM2_VERSION --build-arg NODE_APP_INSIGHTS_SDK_VERSION=$NODE_APP_INSIGHTS_SDK_VERSION --build-arg USER_DOTNET_AI_VERSION=$USER_DOTNET_AI_VERSION --build-arg AI_CONNECTION_STRING=$AI_CONNECTION_STRING .
rm -f ./nodejs-$debian_flavor-$node20Version.tar.gz
;;
esac
;;
"php")
docker build -f ./images/runtime/commonbase/phpRuntimeBase.Dockerfile -t oryx_php_run_base_$debian_flavor --build-arg BASE_IMAGE="docker.io/library/oryx_run_base_$debian_flavor" .
case $stack_version in
"8.1")
docker build -f ./images/runtime/php/8.1/$debian_flavor.Dockerfile -t php81_image_$debian_flavor --build-arg BASE_IMAGE="docker.io/library/oryx_php_run_base_$debian_flavor" --build-arg PHP_VERSION=$php81Version --build-arg PHP_SHA256=$php81Version_SHA --build-arg USER_DOTNET_AI_VERSION=$USER_DOTNET_AI_VERSION --build-arg AI_CONNECTION_STRING=$AI_CONNECTION_STRING .
;;
"8.2")
docker build -f ./images/runtime/php/8.2/$debian_flavor.Dockerfile -t php82_image_$debian_flavor --build-arg BASE_IMAGE="docker.io/library/oryx_php_run_base_$debian_flavor" --build-arg PHP_VERSION=$php82Version --build-arg PHP_SHA256=$php82Version_SHA --build-arg USER_DOTNET_AI_VERSION=$USER_DOTNET_AI_VERSION --build-arg AI_CONNECTION_STRING=$AI_CONNECTION_STRING .
;;
"8.3")
docker build -f ./images/runtime/php/8.3/$debian_flavor.Dockerfile -t php83_image_$debian_flavor --build-arg BASE_IMAGE="docker.io/library/oryx_php_run_base_$debian_flavor" --build-arg PHP_VERSION=$php83Version --build-arg PHP_SHA256=$php83Version_SHA --build-arg USER_DOTNET_AI_VERSION=$USER_DOTNET_AI_VERSION --build-arg AI_CONNECTION_STRING=$AI_CONNECTION_STRING .
;;
esac
;;
"php-fpm")
docker build -f ./images/runtime/commonbase/phpFpmRuntimeBase.Dockerfile -t oryx_php_fpm_run_base_$debian_flavor --build-arg BASE_IMAGE="docker.io/library/oryx_run_base_$debian_flavor" .
case $stack_version in
"8.1")
docker build -f ./images/runtime/php-fpm/8.1/$debian_flavor.Dockerfile -t phpfpm81_image_$debian_flavor --build-arg PHP_VERSION=$php81Version --build-arg PHP_SHA256=$php81Version_SHA --build-arg BASE_IMAGE="docker.io/library/oryx_php_fpm_run_base_$debian_flavor" --build-arg USER_DOTNET_AI_VERSION=$USER_DOTNET_AI_VERSION --build-arg AI_CONNECTION_STRING=$AI_CONNECTION_STRING .
;;
"8.2")
docker build -f ./images/runtime/php-fpm/8.2/$debian_flavor.Dockerfile -t phpfpm82_image_$debian_flavor --build-arg PHP_VERSION=$php82Version --build-arg PHP_SHA256=$php82Version_SHA --build-arg BASE_IMAGE="docker.io/library/oryx_php_fpm_run_base_$debian_flavor" --build-arg USER_DOTNET_AI_VERSION=$USER_DOTNET_AI_VERSION --build-arg AI_CONNECTION_STRING=$AI_CONNECTION_STRING .
;;
"8.3")
docker build -f ./images/runtime/php-fpm/8.3/$debian_flavor.Dockerfile -t phpfpm83_image_$debian_flavor --build-arg PHP_VERSION=$php83Version --build-arg PHP_SHA256=$php81Version_SHA --build-arg BASE_IMAGE="docker.io/library/oryx_php_fpm_run_base_$debian_flavor" --build-arg USER_DOTNET_AI_VERSION=$USER_DOTNET_AI_VERSION --build-arg AI_CONNECTION_STRING=$AI_CONNECTION_STRING .
;;
esac
;;
"python")
case $stack_version in
"3.8")
curl -SL --output "python-$debian_flavor-$python38Version.tar.gz" "https://oryxsdksdev.blob.core.windows.net/python/python-$debian_flavor-$python38Version.tar.gz"
docker build -f ./images/runtime/python/template.Dockerfile -t python38_image_$debian_flavor --build-arg PYTHON_FULL_VERSION=$python38Version --build-arg PYTHON_VERSION=3.8 --build-arg PYTHON_MAJOR_VERSION=3 --build-arg DEBIAN_FLAVOR=$debian_flavor --build-arg BASE_IMAGE="docker.io/library/oryx_run_base_$debian_flavor" --build-arg SDK_STORAGE_BASE_URL_VALUE=$SDK_STORAGE_BASE_URL_VALUE .
rm -f ./python-$debian_flavor-$python38Version.tar.gz
;;
"3.9")
docker build -f ./images/runtime/python/template.Dockerfile -t python39_image_$debian_flavor --build-arg PYTHON_FULL_VERSION=$python39Version --build-arg PYTHON_VERSION=3.9 --build-arg PYTHON_MAJOR_VERSION=3 --build-arg DEBIAN_FLAVOR=$debian_flavor --build-arg BASE_IMAGE="docker.io/library/oryx_run_base_$debian_flavor" --build-arg SDK_STORAGE_BASE_URL_VALUE=$SDK_STORAGE_BASE_URL_VALUE .
;;
"3.10")
docker build -f ./images/runtime/python/template.Dockerfile -t python310_image_$debian_flavor --build-arg PYTHON_FULL_VERSION=$python310Version --build-arg PYTHON_VERSION=3.10 --build-arg PYTHON_MAJOR_VERSION=3 --build-arg DEBIAN_FLAVOR=$debian_flavor --build-arg BASE_IMAGE="docker.io/library/oryx_run_base_$debian_flavor" --build-arg SDK_STORAGE_BASE_URL_VALUE=$SDK_STORAGE_BASE_URL_VALUE .
;;
"3.11")
docker build -f ./images/runtime/python/template.Dockerfile -t python311_image_$debian_flavor --build-arg PYTHON_FULL_VERSION=$python311Version --build-arg PYTHON_VERSION=3.11 --build-arg PYTHON_MAJOR_VERSION=3 --build-arg DEBIAN_FLAVOR=$debian_flavor --build-arg BASE_IMAGE="docker.io/library/oryx_run_base_$debian_flavor" --build-arg SDK_STORAGE_BASE_URL_VALUE=$SDK_STORAGE_BASE_URL_VALUE .
;;
"3.12")
docker build -f ./images/runtime/python/template.Dockerfile -t python312_image_$debian_flavor --build-arg PYTHON_FULL_VERSION=$python3122Version --build-arg PYTHON_VERSION=3.12 --build-arg PYTHON_MAJOR_VERSION=3 --build-arg DEBIAN_FLAVOR=$debian_flavor --build-arg BASE_IMAGE="docker.io/library/oryx_run_base_$debian_flavor" --build-arg SDK_STORAGE_BASE_URL_VALUE=$SDK_STORAGE_BASE_URL_VALUE .
;;
esac
;;
esac

Просмотреть файл

@ -56,17 +56,19 @@ ENV ASPNETCORE_URLS=http://+:80 \
COPY --from=tools-install /dotnetcore-tools /opt/dotnetcore-tools COPY --from=tools-install /dotnetcore-tools /opt/dotnetcore-tools
ARG NET_CORE_APP_60_SHA
ARG ASPNET_CORE_APP_60_SHA
ARG NET_CORE_APP_60
ARG ASPNET_CORE_APP_60
# Install .NET Core # Install .NET Core
RUN set -ex \ RUN set -ex \
&& . ${BUILD_DIR}/__dotNetCoreRunTimeVersions.sh \
&& curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$NET_CORE_APP_60/dotnet-runtime-$NET_CORE_APP_60-linux-x64.tar.gz \ && curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$NET_CORE_APP_60/dotnet-runtime-$NET_CORE_APP_60-linux-x64.tar.gz \
&& echo "$NET_CORE_APP_60_SHA dotnet.tar.gz" | sha512sum -c - \ && echo "$NET_CORE_APP_60_SHA dotnet.tar.gz" | sha512sum -c - \
&& mkdir -p /usr/share/dotnet \ && mkdir -p /usr/share/dotnet \
&& tar -zxf dotnet.tar.gz -C /usr/share/dotnet \ && tar -zxf dotnet.tar.gz -C /usr/share/dotnet \
&& rm dotnet.tar.gz \ && rm dotnet.tar.gz \
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \
# Install ASP.NET Core
&& . ${BUILD_DIR}/__dotNetCoreRunTimeVersions.sh \
&& curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_CORE_APP_60/aspnetcore-runtime-$ASPNET_CORE_APP_60-linux-x64.tar.gz \ && curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_CORE_APP_60/aspnetcore-runtime-$ASPNET_CORE_APP_60-linux-x64.tar.gz \
&& echo "$ASPNET_CORE_APP_60_SHA aspnetcore.tar.gz" | sha512sum -c - \ && echo "$ASPNET_CORE_APP_60_SHA aspnetcore.tar.gz" | sha512sum -c - \
&& mkdir -p /usr/share/dotnet \ && mkdir -p /usr/share/dotnet \

Просмотреть файл

@ -54,6 +54,11 @@ ENV ASPNETCORE_URLS=http://+:80 \
COPY --from=tools-install /dotnetcore-tools /opt/dotnetcore-tools COPY --from=tools-install /dotnetcore-tools /opt/dotnetcore-tools
ARG NET_CORE_APP_60_SHA
ARG ASPNET_CORE_APP_60_SHA
ARG NET_CORE_APP_60
ARG ASPNET_CORE_APP_60
# Install .NET Core # Install .NET Core
RUN set -ex \ RUN set -ex \
# based on resolution on https://github.com/NuGet/Announcements/issues/49#issue-795386700 # based on resolution on https://github.com/NuGet/Announcements/issues/49#issue-795386700
@ -61,7 +66,6 @@ RUN set -ex \
&& apt-get purge ca-certificates -y \ && apt-get purge ca-certificates -y \
&& apt-get update \ && apt-get update \
&& apt-get install -f ca-certificates=20200601~deb10u2 -y --no-install-recommends \ && apt-get install -f ca-certificates=20200601~deb10u2 -y --no-install-recommends \
&& . ${BUILD_DIR}/__dotNetCoreRunTimeVersions.sh \
&& curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$NET_CORE_APP_60/dotnet-runtime-$NET_CORE_APP_60-linux-x64.tar.gz \ && curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$NET_CORE_APP_60/dotnet-runtime-$NET_CORE_APP_60-linux-x64.tar.gz \
&& echo "$NET_CORE_APP_60_SHA dotnet.tar.gz" | sha512sum -c - \ && echo "$NET_CORE_APP_60_SHA dotnet.tar.gz" | sha512sum -c - \
&& mkdir -p /usr/share/dotnet \ && mkdir -p /usr/share/dotnet \
@ -69,7 +73,6 @@ RUN set -ex \
&& rm dotnet.tar.gz \ && rm dotnet.tar.gz \
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \
# Install ASP.NET Core # Install ASP.NET Core
&& . ${BUILD_DIR}/__dotNetCoreRunTimeVersions.sh \
&& curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_CORE_APP_60/aspnetcore-runtime-$ASPNET_CORE_APP_60-linux-x64.tar.gz \ && curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_CORE_APP_60/aspnetcore-runtime-$ASPNET_CORE_APP_60-linux-x64.tar.gz \
&& echo "$ASPNET_CORE_APP_60_SHA aspnetcore.tar.gz" | sha512sum -c - \ && echo "$ASPNET_CORE_APP_60_SHA aspnetcore.tar.gz" | sha512sum -c - \
&& mkdir -p /usr/share/dotnet \ && mkdir -p /usr/share/dotnet \

Просмотреть файл

@ -55,9 +55,13 @@ ENV ASPNETCORE_URLS=http://+:80 \
COPY --from=tools-install /dotnetcore-tools /opt/dotnetcore-tools COPY --from=tools-install /dotnetcore-tools /opt/dotnetcore-tools
ARG NET_CORE_APP_70_SHA
ARG ASPNET_CORE_APP_70_SHA
ARG NET_CORE_APP_70
ARG ASPNET_CORE_APP_70
# Install .NET Core # Install .NET Core
RUN set -ex \ RUN set -ex \
&& . ${BUILD_DIR}/__dotNetCoreRunTimeVersions.sh \
&& curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$NET_CORE_APP_70/dotnet-runtime-$NET_CORE_APP_70-linux-x64.tar.gz \ && curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$NET_CORE_APP_70/dotnet-runtime-$NET_CORE_APP_70-linux-x64.tar.gz \
&& echo "$NET_CORE_APP_70_SHA dotnet.tar.gz" | sha512sum -c - \ && echo "$NET_CORE_APP_70_SHA dotnet.tar.gz" | sha512sum -c - \
&& mkdir -p /usr/share/dotnet \ && mkdir -p /usr/share/dotnet \
@ -65,7 +69,6 @@ RUN set -ex \
&& rm dotnet.tar.gz \ && rm dotnet.tar.gz \
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \
# Install ASP.NET Core # Install ASP.NET Core
&& . ${BUILD_DIR}/__dotNetCoreRunTimeVersions.sh \
&& curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_CORE_APP_70/aspnetcore-runtime-$ASPNET_CORE_APP_70-linux-x64.tar.gz \ && curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_CORE_APP_70/aspnetcore-runtime-$ASPNET_CORE_APP_70-linux-x64.tar.gz \
&& echo "$ASPNET_CORE_APP_70_SHA aspnetcore.tar.gz" | sha512sum -c - \ && echo "$ASPNET_CORE_APP_70_SHA aspnetcore.tar.gz" | sha512sum -c - \
&& mkdir -p /usr/share/dotnet \ && mkdir -p /usr/share/dotnet \

Просмотреть файл

@ -53,6 +53,11 @@ ENV ASPNETCORE_URLS=http://+:80 \
COPY --from=tools-install /dotnetcore-tools /opt/dotnetcore-tools COPY --from=tools-install /dotnetcore-tools /opt/dotnetcore-tools
ARG NET_CORE_APP_70_SHA
ARG ASPNET_CORE_APP_70_SHA
ARG NET_CORE_APP_70
ARG ASPNET_CORE_APP_70
# Install .NET Core # Install .NET Core
RUN set -ex \ RUN set -ex \
# based on resolution on https://github.com/NuGet/Announcements/issues/49#issue-795386700 # based on resolution on https://github.com/NuGet/Announcements/issues/49#issue-795386700
@ -60,7 +65,6 @@ RUN set -ex \
&& apt-get purge ca-certificates -y \ && apt-get purge ca-certificates -y \
&& apt-get update \ && apt-get update \
&& apt-get install -f ca-certificates=20200601~deb10u2 -y --no-install-recommends \ && apt-get install -f ca-certificates=20200601~deb10u2 -y --no-install-recommends \
&& . ${BUILD_DIR}/__dotNetCoreRunTimeVersions.sh \
&& curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$NET_CORE_APP_70/dotnet-runtime-$NET_CORE_APP_70-linux-x64.tar.gz \ && curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$NET_CORE_APP_70/dotnet-runtime-$NET_CORE_APP_70-linux-x64.tar.gz \
&& echo "$NET_CORE_APP_70_SHA dotnet.tar.gz" | sha512sum -c - \ && echo "$NET_CORE_APP_70_SHA dotnet.tar.gz" | sha512sum -c - \
&& mkdir -p /usr/share/dotnet \ && mkdir -p /usr/share/dotnet \
@ -68,7 +72,6 @@ RUN set -ex \
&& rm dotnet.tar.gz \ && rm dotnet.tar.gz \
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \
# Install ASP.NET Core # Install ASP.NET Core
&& . ${BUILD_DIR}/__dotNetCoreRunTimeVersions.sh \
&& curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_CORE_APP_70/aspnetcore-runtime-$ASPNET_CORE_APP_70-linux-x64.tar.gz \ && curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_CORE_APP_70/aspnetcore-runtime-$ASPNET_CORE_APP_70-linux-x64.tar.gz \
&& echo "$ASPNET_CORE_APP_70_SHA aspnetcore.tar.gz" | sha512sum -c - \ && echo "$ASPNET_CORE_APP_70_SHA aspnetcore.tar.gz" | sha512sum -c - \
&& mkdir -p /usr/share/dotnet \ && mkdir -p /usr/share/dotnet \

Просмотреть файл

@ -54,6 +54,11 @@ ENV ASPNETCORE_URLS=http://+:80 \
COPY --from=tools-install /dotnetcore-tools /opt/dotnetcore-tools COPY --from=tools-install /dotnetcore-tools /opt/dotnetcore-tools
ARG NET_CORE_APP_80_SHA
ARG ASPNET_CORE_APP_80_SHA
ARG NET_CORE_APP_80
ARG ASPNET_CORE_APP_80
# Install .NET Core # Install .NET Core
RUN set -ex \ RUN set -ex \
# based on resolution on https://github.com/NuGet/Announcements/issues/49#issue-795386700 # based on resolution on https://github.com/NuGet/Announcements/issues/49#issue-795386700
@ -61,7 +66,6 @@ RUN set -ex \
&& apt-get purge ca-certificates -y \ && apt-get purge ca-certificates -y \
&& apt-get update \ && apt-get update \
&& apt-get install -f ca-certificates -y --no-install-recommends \ && apt-get install -f ca-certificates -y --no-install-recommends \
&& . ${BUILD_DIR}/__dotNetCoreRunTimeVersions.sh \
&& curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$NET_CORE_APP_80/dotnet-runtime-$NET_CORE_APP_80-linux-x64.tar.gz \ && curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$NET_CORE_APP_80/dotnet-runtime-$NET_CORE_APP_80-linux-x64.tar.gz \
&& echo "$NET_CORE_APP_80_SHA dotnet.tar.gz" | sha512sum -c - \ && echo "$NET_CORE_APP_80_SHA dotnet.tar.gz" | sha512sum -c - \
&& mkdir -p /usr/share/dotnet \ && mkdir -p /usr/share/dotnet \
@ -69,7 +73,6 @@ RUN set -ex \
&& rm dotnet.tar.gz \ && rm dotnet.tar.gz \
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \
# Install ASP.NET Core # Install ASP.NET Core
&& . ${BUILD_DIR}/__dotNetCoreRunTimeVersions.sh \
&& curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_CORE_APP_80/aspnetcore-runtime-$ASPNET_CORE_APP_80-linux-x64.tar.gz \ && curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_CORE_APP_80/aspnetcore-runtime-$ASPNET_CORE_APP_80-linux-x64.tar.gz \
&& echo "$ASPNET_CORE_APP_80_SHA aspnetcore.tar.gz" | sha512sum -c - \ && echo "$ASPNET_CORE_APP_80_SHA aspnetcore.tar.gz" | sha512sum -c - \
&& mkdir -p /usr/share/dotnet \ && mkdir -p /usr/share/dotnet \

Просмотреть файл

@ -53,6 +53,11 @@ ENV ASPNETCORE_URLS=http://+:80 \
COPY --from=tools-install /dotnetcore-tools /opt/dotnetcore-tools COPY --from=tools-install /dotnetcore-tools /opt/dotnetcore-tools
ARG NET_CORE_APP_80_SHA
ARG ASPNET_CORE_APP_80_SHA
ARG NET_CORE_APP_80
ARG ASPNET_CORE_APP_80
# Install .NET Core # Install .NET Core
RUN set -ex \ RUN set -ex \
# based on resolution on https://github.com/NuGet/Announcements/issues/49#issue-795386700 # based on resolution on https://github.com/NuGet/Announcements/issues/49#issue-795386700
@ -60,7 +65,6 @@ RUN set -ex \
&& apt-get purge ca-certificates -y \ && apt-get purge ca-certificates -y \
&& apt-get update \ && apt-get update \
&& apt-get install -f ca-certificates -y --no-install-recommends \ && apt-get install -f ca-certificates -y --no-install-recommends \
&& . ${BUILD_DIR}/__dotNetCoreRunTimeVersions.sh \
&& curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$NET_CORE_APP_80/dotnet-runtime-$NET_CORE_APP_80-linux-x64.tar.gz \ && curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$NET_CORE_APP_80/dotnet-runtime-$NET_CORE_APP_80-linux-x64.tar.gz \
&& echo "$NET_CORE_APP_80_SHA dotnet.tar.gz" | sha512sum -c - \ && echo "$NET_CORE_APP_80_SHA dotnet.tar.gz" | sha512sum -c - \
&& mkdir -p /usr/share/dotnet \ && mkdir -p /usr/share/dotnet \
@ -68,7 +72,6 @@ RUN set -ex \
&& rm dotnet.tar.gz \ && rm dotnet.tar.gz \
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \
# Install ASP.NET Core # Install ASP.NET Core
&& . ${BUILD_DIR}/__dotNetCoreRunTimeVersions.sh \
&& curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_CORE_APP_80/aspnetcore-runtime-$ASPNET_CORE_APP_80-linux-x64.tar.gz \ && curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_CORE_APP_80/aspnetcore-runtime-$ASPNET_CORE_APP_80-linux-x64.tar.gz \
&& echo "$ASPNET_CORE_APP_80_SHA aspnetcore.tar.gz" | sha512sum -c - \ && echo "$ASPNET_CORE_APP_80_SHA aspnetcore.tar.gz" | sha512sum -c - \
&& mkdir -p /usr/share/dotnet \ && mkdir -p /usr/share/dotnet \

Просмотреть файл

@ -54,6 +54,11 @@ ENV ASPNETCORE_URLS=http://+:80 \
COPY --from=tools-install /dotnetcore-tools /opt/dotnetcore-tools COPY --from=tools-install /dotnetcore-tools /opt/dotnetcore-tools
ARG NET_CORE_APP_90_SHA
ARG ASPNET_CORE_APP_90_SHA
ARG NET_CORE_APP_90
ARG ASPNET_CORE_APP_90
# Install .NET Core # Install .NET Core
RUN set -ex \ RUN set -ex \
# based on resolution on https://github.com/NuGet/Announcements/issues/49#issue-795386700 # based on resolution on https://github.com/NuGet/Announcements/issues/49#issue-795386700
@ -61,7 +66,6 @@ RUN set -ex \
&& apt-get purge ca-certificates -y \ && apt-get purge ca-certificates -y \
&& apt-get update \ && apt-get update \
&& apt-get install -f ca-certificates -y --no-install-recommends \ && apt-get install -f ca-certificates -y --no-install-recommends \
&& . ${BUILD_DIR}/__dotNetCoreRunTimeVersions.sh \
&& curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$NET_CORE_APP_90/dotnet-runtime-$NET_CORE_APP_90-linux-x64.tar.gz \ && curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$NET_CORE_APP_90/dotnet-runtime-$NET_CORE_APP_90-linux-x64.tar.gz \
&& echo "$NET_CORE_APP_90_SHA dotnet.tar.gz" | sha512sum -c - \ && echo "$NET_CORE_APP_90_SHA dotnet.tar.gz" | sha512sum -c - \
&& mkdir -p /usr/share/dotnet \ && mkdir -p /usr/share/dotnet \
@ -69,7 +73,6 @@ RUN set -ex \
&& rm dotnet.tar.gz \ && rm dotnet.tar.gz \
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \
# Install ASP.NET Core # Install ASP.NET Core
&& . ${BUILD_DIR}/__dotNetCoreRunTimeVersions.sh \
&& curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_CORE_APP_90/aspnetcore-runtime-$ASPNET_CORE_APP_90-linux-x64.tar.gz \ && curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_CORE_APP_90/aspnetcore-runtime-$ASPNET_CORE_APP_90-linux-x64.tar.gz \
&& echo "$ASPNET_CORE_APP_90_SHA aspnetcore.tar.gz" | sha512sum -c - \ && echo "$ASPNET_CORE_APP_90_SHA aspnetcore.tar.gz" | sha512sum -c - \
&& mkdir -p /usr/share/dotnet \ && mkdir -p /usr/share/dotnet \

Просмотреть файл

@ -42,9 +42,13 @@ RUN set -e \
&& tar -xzf nodejs-bullseye-${NODE18_VERSION}.tar.gz -C /usr/local \ && tar -xzf nodejs-bullseye-${NODE18_VERSION}.tar.gz -C /usr/local \
&& rm nodejs-bullseye-${NODE18_VERSION}.tar.gz \ && rm nodejs-bullseye-${NODE18_VERSION}.tar.gz \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs && ln -s /usr/local/bin/node /usr/local/bin/nodejs
RUN . ${BUILD_DIR}/__nodeVersions.sh \
&& npm install -g npm@${NPM_VERSION} ARG NPM_VERSION
RUN ${IMAGES_DIR}/runtime/node/installDependencies.sh ARG PM2_VERSION
ARG NODE_APP_INSIGHTS_SDK_VERSION
RUN npm install -g npm@${NPM_VERSION}
RUN PM2_VERSION=${PM2_VERSION} NODE_APP_INSIGHTS_SDK_VERSION=${NODE_APP_INSIGHTS_SDK_VERSION} ${IMAGES_DIR}/runtime/node/installDependencies.sh
RUN rm -rf /tmp/oryx RUN rm -rf /tmp/oryx
# Bake Application Insights key from pipeline variable into final image # Bake Application Insights key from pipeline variable into final image

Просмотреть файл

@ -43,9 +43,14 @@ RUN set -e \
&& tar -xzf nodejs-bookworm-${NODE20_VERSION}.tar.gz -C /usr/local \ && tar -xzf nodejs-bookworm-${NODE20_VERSION}.tar.gz -C /usr/local \
&& rm nodejs-bookworm-${NODE20_VERSION}.tar.gz \ && rm nodejs-bookworm-${NODE20_VERSION}.tar.gz \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs && ln -s /usr/local/bin/node /usr/local/bin/nodejs
RUN . ${BUILD_DIR}/__nodeVersions.sh \
&& npm install -g npm@${NPM_VERSION} ARG NPM_VERSION
RUN ${IMAGES_DIR}/runtime/node/installDependencies.sh ARG PM2_VERSION
ARG NODE_APP_INSIGHTS_SDK_VERSION
RUN npm install -g npm@${NPM_VERSION}
RUN PM2_VERSION=${PM2_VERSION} NODE_APP_INSIGHTS_SDK_VERSION=${NODE_APP_INSIGHTS_SDK_VERSION} ${IMAGES_DIR}/runtime/node/installDependencies.sh
RUN rm -rf /tmp/oryx RUN rm -rf /tmp/oryx
# Bake Application Insights key from pipeline variable into final image # Bake Application Insights key from pipeline variable into final image

Просмотреть файл

@ -43,9 +43,13 @@ RUN set -e \
&& tar -xzf nodejs-bullseye-${NODE20_VERSION}.tar.gz -C /usr/local \ && tar -xzf nodejs-bullseye-${NODE20_VERSION}.tar.gz -C /usr/local \
&& rm nodejs-bullseye-${NODE20_VERSION}.tar.gz \ && rm nodejs-bullseye-${NODE20_VERSION}.tar.gz \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs && ln -s /usr/local/bin/node /usr/local/bin/nodejs
RUN . ${BUILD_DIR}/__nodeVersions.sh \
&& npm install -g npm@${NPM_VERSION} ARG NPM_VERSION
RUN ${IMAGES_DIR}/runtime/node/installDependencies.sh ARG PM2_VERSION
ARG NODE_APP_INSIGHTS_SDK_VERSION
RUN npm install -g npm@${NPM_VERSION}
RUN PM2_VERSION=${PM2_VERSION} NODE_APP_INSIGHTS_SDK_VERSION=${NODE_APP_INSIGHTS_SDK_VERSION} ${IMAGES_DIR}/runtime/node/installDependencies.sh
RUN rm -rf /tmp/oryx RUN rm -rf /tmp/oryx
# Bake Application Insights key from pipeline variable into final image # Bake Application Insights key from pipeline variable into final image

Просмотреть файл

@ -6,13 +6,16 @@
set -ex set -ex
source /tmp/oryx/build/__nodeVersions.sh # source /tmp/oryx/build/__nodeVersions.sh
# All users need access to node_modules at the root, as this is the location # All users need access to node_modules at the root, as this is the location
# for packages valid for all apps. # for packages valid for all apps.
mkdir -p /node_modules mkdir -p /node_modules
chmod 777 /node_modules chmod 777 /node_modules
# PM2_VERSION=$1
# NODE_APP_INSIGHTS_SDK_VERSION=$2
# Since older versions of npm cli have security vulnerabilities, we try upgrading it # Since older versions of npm cli have security vulnerabilities, we try upgrading it
# to the latest available version. However latest versions of npm do not work with very # to the latest available version. However latest versions of npm do not work with very
# old versions of Node (for example: 4 or 6), so we special case here to limit the upgrade # old versions of Node (for example: 4 or 6), so we special case here to limit the upgrade

Просмотреть файл

@ -59,10 +59,11 @@ ENV PHP_LDFLAGS="-Wl,-O1 -Wl,--hash-style=both -pie"
ENV GPG_KEYS 528995BFEDFBA7191D46839EF9BA0ADA31CBD89E 39B641343D8C104B2B146DC3F9C39DC0B9698544 F1F692238FBC1666E5A5CCD4199F9DFEF6FFBAFD ENV GPG_KEYS 528995BFEDFBA7191D46839EF9BA0ADA31CBD89E 39B641343D8C104B2B146DC3F9C39DC0B9698544 F1F692238FBC1666E5A5CCD4199F9DFEF6FFBAFD
ARG PHP_VERSION
ENV PHP_VERSION 8.1.29 ARG PHP_SHA256
ENV PHP_URL="https://www.php.net/get/php-8.1.29.tar.xz/from/this/mirror" PHP_ASC_URL="https://www.php.net/get/php-8.1.29.tar.xz.asc/from/this/mirror" ENV PHP_VERSION ${PHP_VERSION}
ENV PHP_SHA256="288884af60581d4284baba2ace9ca6d646f72facbd3e3c2dd2acc7fe6f903536" PHP_MD5="" ENV PHP_URL="https://www.php.net/get/php-${PHP_VERSION}.tar.xz/from/this/mirror" PHP_ASC_URL="https://www.php.net/get/php-${PHP_VERSION}.tar.xz.asc/from/this/mirror" PHP_MD5=""
ENV PHP_SHA256 ${PHP_SHA256}
RUN set -eux; \ RUN set -eux; \
\ \
@ -269,8 +270,6 @@ CMD ["php-fpm"]
## base dockerfile ## base dockerfile
SHELL ["/bin/bash", "-c"] SHELL ["/bin/bash", "-c"]
ARG PHP_VERSION
ENV PHP_VERSION ${PHP_VERSION}
# An environment variable for oryx run-script to know the origin of php image so that # An environment variable for oryx run-script to know the origin of php image so that
# start-up command can be determined while creating run script # start-up command can be determined while creating run script

Просмотреть файл

@ -59,10 +59,11 @@ ENV PHP_LDFLAGS="-Wl,-O1 -Wl,--hash-style=both -pie"
ENV GPG_KEYS 528995BFEDFBA7191D46839EF9BA0ADA31CBD89E 39B641343D8C104B2B146DC3F9C39DC0B9698544 F1F692238FBC1666E5A5CCD4199F9DFEF6FFBAFD ENV GPG_KEYS 528995BFEDFBA7191D46839EF9BA0ADA31CBD89E 39B641343D8C104B2B146DC3F9C39DC0B9698544 F1F692238FBC1666E5A5CCD4199F9DFEF6FFBAFD
ARG PHP_VERSION
ENV PHP_VERSION 8.1.29 ARG PHP_SHA256
ENV PHP_URL="https://www.php.net/get/php-8.1.29.tar.xz/from/this/mirror" PHP_ASC_URL="https://www.php.net/get/php-8.1.29.tar.xz.asc/from/this/mirror" ENV PHP_VERSION ${PHP_VERSION}
ENV PHP_SHA256="288884af60581d4284baba2ace9ca6d646f72facbd3e3c2dd2acc7fe6f903536" PHP_MD5="" ENV PHP_URL="https://www.php.net/get/php-${PHP_VERSION}.tar.xz/from/this/mirror" PHP_ASC_URL="https://www.php.net/get/php-${PHP_VERSION}.tar.xz.asc/from/this/mirror" PHP_MD5=""
ENV PHP_SHA256 ${PHP_SHA256}
RUN set -eux; \ RUN set -eux; \
\ \
@ -269,8 +270,6 @@ CMD ["php-fpm"]
## base dockerfile ## base dockerfile
SHELL ["/bin/bash", "-c"] SHELL ["/bin/bash", "-c"]
ARG PHP_VERSION
ENV PHP_VERSION ${PHP_VERSION}
# An environment variable for oryx run-script to know the origin of php image so that # An environment variable for oryx run-script to know the origin of php image so that
# start-up command can be determined while creating run script # start-up command can be determined while creating run script

Просмотреть файл

@ -59,9 +59,11 @@ ENV PHP_LDFLAGS="-Wl,-O1 -Wl,--hash-style=both -pie"
ENV GPG_KEYS 1198C0117593497A5EC5C199286AF1F9897469DC 39B641343D8C104B2B146DC3F9C39DC0B9698544 E60913E4DF209907D8E30D96659A97C9CF2A795A ENV GPG_KEYS 1198C0117593497A5EC5C199286AF1F9897469DC 39B641343D8C104B2B146DC3F9C39DC0B9698544 E60913E4DF209907D8E30D96659A97C9CF2A795A
ENV PHP_VERSION 8.2.21 ARG PHP_VERSION
ENV PHP_URL="https://www.php.net/get/php-8.2.21.tar.xz/from/this/mirror" PHP_ASC_URL="https://www.php.net/get/php-8.2.21.tar.xz.asc/from/this/mirror" ARG PHP_SHA256
ENV PHP_SHA256="8cc44d51bb2506399ec176f70fe110f0c9e1f7d852a5303a2cd1403402199707" PHP_MD5="" ENV PHP_VERSION ${PHP_VERSION}
ENV PHP_URL="https://www.php.net/get/php-${PHP_VERSION}.tar.xz/from/this/mirror" PHP_ASC_URL="https://www.php.net/get/php-${PHP_VERSION}.tar.xz.asc/from/this/mirror" PHP_MD5=""
ENV PHP_SHA256 ${PHP_SHA256}
RUN set -eux; \ RUN set -eux; \
\ \
@ -268,8 +270,6 @@ CMD ["php-fpm"]
## base dockerfile ## base dockerfile
SHELL ["/bin/bash", "-c"] SHELL ["/bin/bash", "-c"]
ARG PHP_VERSION
ENV PHP_VERSION ${PHP_VERSION}
# An environment variable for oryx run-script to know the origin of php image so that # An environment variable for oryx run-script to know the origin of php image so that
# start-up command can be determined while creating run script # start-up command can be determined while creating run script

Просмотреть файл

@ -59,9 +59,11 @@ ENV PHP_LDFLAGS="-Wl,-O1 -Wl,--hash-style=both -pie"
ENV GPG_KEYS 1198C0117593497A5EC5C199286AF1F9897469DC 39B641343D8C104B2B146DC3F9C39DC0B9698544 E60913E4DF209907D8E30D96659A97C9CF2A795A ENV GPG_KEYS 1198C0117593497A5EC5C199286AF1F9897469DC 39B641343D8C104B2B146DC3F9C39DC0B9698544 E60913E4DF209907D8E30D96659A97C9CF2A795A
ENV PHP_VERSION 8.2.21 ARG PHP_VERSION
ENV PHP_URL="https://www.php.net/get/php-8.2.21.tar.xz/from/this/mirror" PHP_ASC_URL="https://www.php.net/get/php-8.2.21.tar.xz.asc/from/this/mirror" ARG PHP_SHA256
ENV PHP_SHA256="8cc44d51bb2506399ec176f70fe110f0c9e1f7d852a5303a2cd1403402199707" PHP_MD5="" ENV PHP_VERSION ${PHP_VERSION}
ENV PHP_URL="https://www.php.net/get/php-${PHP_VERSION}.tar.xz/from/this/mirror" PHP_ASC_URL="https://www.php.net/get/php-${PHP_VERSION}.tar.xz.asc/from/this/mirror" PHP_MD5=""
ENV PHP_SHA256 ${PHP_SHA256}
RUN set -eux; \ RUN set -eux; \
\ \
@ -268,9 +270,6 @@ CMD ["php-fpm"]
## base dockerfile ## base dockerfile
SHELL ["/bin/bash", "-c"] SHELL ["/bin/bash", "-c"]
ARG PHP_VERSION
ENV PHP_VERSION ${PHP_VERSION}
# An environment variable for oryx run-script to know the origin of php image so that # An environment variable for oryx run-script to know the origin of php image so that
# start-up command can be determined while creating run script # start-up command can be determined while creating run script
ENV PHP_ORIGIN php-fpm ENV PHP_ORIGIN php-fpm

Просмотреть файл

@ -57,9 +57,11 @@ ENV PHP_LDFLAGS="-Wl,-O1 -Wl,--hash-style=both -pie"
ENV GPG_KEYS 1198C0117593497A5EC5C199286AF1F9897469DC AFD8691FDAEDF03BDF6E460563F15A9B715376CA C28D937575603EB4ABB725861C0779DC5C0A9DE4 ENV GPG_KEYS 1198C0117593497A5EC5C199286AF1F9897469DC AFD8691FDAEDF03BDF6E460563F15A9B715376CA C28D937575603EB4ABB725861C0779DC5C0A9DE4
ENV PHP_VERSION 8.3.9 ARG PHP_VERSION
ENV PHP_URL="https://www.php.net/get/php-8.3.9.tar.xz/from/this/mirror" PHP_ASC_URL="https://www.php.net/get/php-8.3.9.tar.xz.asc/from/this/mirror" ARG PHP_SHA256
ENV PHP_SHA256="bf4d7b8ea60a356064f88485278bd6f941a230ec16f0fc401574ce1445ad6c77" PHP_MD5="" ENV PHP_VERSION ${PHP_VERSION}
ENV PHP_URL="https://www.php.net/get/php-${PHP_VERSION}.tar.xz/from/this/mirror" PHP_ASC_URL="https://www.php.net/get/php-${PHP_VERSION}.tar.xz.asc/from/this/mirror" PHP_MD5=""
ENV PHP_SHA256 ${PHP_SHA256}
RUN set -eux; \ RUN set -eux; \
\ \
@ -263,10 +265,6 @@ CMD ["php-fpm"]
## base dockefile ## base dockefile
SHELL ["/bin/bash", "-c"] SHELL ["/bin/bash", "-c"]
ARG PHP_VERSION
ENV PHP_VERSION ${PHP_VERSION}
# An environment variable for oryx run-script to know the origin of php image so that # An environment variable for oryx run-script to know the origin of php image so that
# start-up command can be determined while creating run script # start-up command can be determined while creating run script
ENV PHP_ORIGIN php-fpm ENV PHP_ORIGIN php-fpm

Просмотреть файл

@ -59,10 +59,11 @@ ENV PHP_LDFLAGS="-Wl,-O1 -Wl,--hash-style=both -pie"
ENV GPG_KEYS 1198C0117593497A5EC5C199286AF1F9897469DC AFD8691FDAEDF03BDF6E460563F15A9B715376CA C28D937575603EB4ABB725861C0779DC5C0A9DE4 ENV GPG_KEYS 1198C0117593497A5EC5C199286AF1F9897469DC AFD8691FDAEDF03BDF6E460563F15A9B715376CA C28D937575603EB4ABB725861C0779DC5C0A9DE4
ENV PHP_VERSION 8.3.9 ARG PHP_VERSION
ARG PHP_SHA256
ENV PHP_URL="https://www.php.net/get/php-8.3.9.tar.xz/from/this/mirror" PHP_ASC_URL="https://www.php.net/get/php-8.3.9.tar.xz.asc/from/this/mirror" ENV PHP_VERSION ${PHP_VERSION}
ENV PHP_SHA256="bf4d7b8ea60a356064f88485278bd6f941a230ec16f0fc401574ce1445ad6c77" PHP_MD5="" ENV PHP_URL="https://www.php.net/get/php-${PHP_VERSION}.tar.xz/from/this/mirror" PHP_ASC_URL="https://www.php.net/get/php-${PHP_VERSION}.tar.xz.asc/from/this/mirror" PHP_MD5=""
ENV PHP_SHA256 ${PHP_SHA256}
RUN set -eux; \ RUN set -eux; \
\ \
@ -268,8 +269,6 @@ CMD ["php-fpm"]
## base dockerfile ## base dockerfile
SHELL ["/bin/bash", "-c"] SHELL ["/bin/bash", "-c"]
ARG PHP_VERSION
ENV PHP_VERSION ${PHP_VERSION}
# An environment variable for oryx run-script to know the origin of php image so that # An environment variable for oryx run-script to know the origin of php image so that
# start-up command can be determined while creating run script # start-up command can be determined while creating run script

Просмотреть файл

@ -59,9 +59,11 @@ ENV PHP_LDFLAGS="-Wl,-O1 -Wl,--hash-style=both -pie"
ENV GPG_KEYS 1198C0117593497A5EC5C199286AF1F9897469DC AFD8691FDAEDF03BDF6E460563F15A9B715376CA C28D937575603EB4ABB725861C0779DC5C0A9DE4 ENV GPG_KEYS 1198C0117593497A5EC5C199286AF1F9897469DC AFD8691FDAEDF03BDF6E460563F15A9B715376CA C28D937575603EB4ABB725861C0779DC5C0A9DE4
ENV PHP_VERSION 8.3.9 ARG PHP_VERSION
ENV PHP_URL="https://www.php.net/get/php-8.3.9.tar.xz/from/this/mirror" PHP_ASC_URL="https://www.php.net/get/php-8.3.9.tar.xz.asc/from/this/mirror" ARG PHP_SHA256
ENV PHP_SHA256="bf4d7b8ea60a356064f88485278bd6f941a230ec16f0fc401574ce1445ad6c77" PHP_MD5="" ENV PHP_VERSION ${PHP_VERSION}
ENV PHP_URL="https://www.php.net/get/php-${PHP_VERSION}.tar.xz/from/this/mirror" PHP_ASC_URL="https://www.php.net/get/php-${PHP_VERSION}.tar.xz.asc/from/this/mirror" PHP_MD5=""
ENV PHP_SHA256 ${PHP_SHA256}
RUN set -eux; \ RUN set -eux; \
\ \
@ -268,9 +270,6 @@ CMD ["php-fpm"]
## base dockerfile ## base dockerfile
SHELL ["/bin/bash", "-c"] SHELL ["/bin/bash", "-c"]
ARG PHP_VERSION
ENV PHP_VERSION ${PHP_VERSION}
# An environment variable for oryx run-script to know the origin of php image so that # An environment variable for oryx run-script to know the origin of php image so that
# start-up command can be determined while creating run script # start-up command can be determined while creating run script
ENV PHP_ORIGIN php-fpm ENV PHP_ORIGIN php-fpm

Просмотреть файл

@ -1,7 +0,0 @@
#!/bin/bash
declare -r __DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
source "$__DIR/../../../build/__phpVersions.sh"
declare -r VERSION_ARRAY_BOOKWORM=($PHP83_VERSION)
declare -r VERSION_ARRAY_BULLSEYE=($PHP74_VERSION $PHP80_VERSION $PHP81_VERSION $PHP82_VERSION $PHP83_VERSION)
declare -r VERSION_ARRAY_BUSTER=($PHP74_VERSION $PHP80_VERSION $PHP81_VERSION $PHP82_VERSION $PHP83_VERSION)

Просмотреть файл

@ -1,49 +0,0 @@
#!/bin/bash
set -ex
declare -r CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
source "$CURRENT_DIR/__versions.sh"
baseImage="oryxdevmcr.azurecr.io/private/oryx/php-fpm-run-base"
baseImageDebianFlavor="$1"
PHP_VERSION_ARRAY=("${VERSION_ARRAY[@]}")
if [ "$baseImageDebianFlavor" == "bookworm" ];then
PHP_VERSION_ARRAY=("${VERSION_ARRAY_BOOKWORM[@]}")
elif [ "$baseImageDebianFlavor" == "bullseye" ];then
PHP_VERSION_ARRAY=("${VERSION_ARRAY_BULLSEYE[@]}")
elif [ "$baseImageDebianFlavor" == "buster" ];then
PHP_VERSION_ARRAY=("${VERSION_ARRAY_BUSTER[@]}")
fi
echo
echo "Building '$baseImageDebianFlavor' based image '$baseImage' ..."
docker build \
-t $baseImage-$baseImageDebianFlavor \
--build-arg DEBIAN_FLAVOR=$baseImageDebianFlavor \
-f "$CURRENT_DIR/runbase.Dockerfile" \
.
echo "*****************"
echo "PHP_VERSION_ARRAY"
echo "${PHP_VERSION_ARRAY[@]}"
echo "*****************"
for PHP_VERSION in "${PHP_VERSION_ARRAY[@]}"
do
IFS='.' read -ra SPLIT_VERSION <<< "$PHP_VERSION"
VERSION_DIRECTORY="${SPLIT_VERSION[0]}.${SPLIT_VERSION[1]}"
PHP_IMAGE_NAME="oryxdevmcr.azurecr.io/private/oryx/php-fpm-$VERSION_DIRECTORY-$baseImageDebianFlavor"
cd "$CURRENT_DIR/$VERSION_DIRECTORY/"
echo
echo "Building '$baseImageDebianFlavor' based php-fpm image '$PHP_IMAGE_NAME'..."
echo
docker build \
-t $PHP_IMAGE_NAME \
--build-arg DEBIAN_FLAVOR=$baseImageDebianFlavor \
-f "$VERSION_DIRECTORY.$baseImageDebianFlavor.Dockerfile" \
.
done

Просмотреть файл

@ -115,9 +115,12 @@ ENV PHP_LDFLAGS="-Wl,-O1 -Wl,--hash-style=both -pie"
ENV GPG_KEYS 528995BFEDFBA7191D46839EF9BA0ADA31CBD89E 39B641343D8C104B2B146DC3F9C39DC0B9698544 F1F692238FBC1666E5A5CCD4199F9DFEF6FFBAFD ENV GPG_KEYS 528995BFEDFBA7191D46839EF9BA0ADA31CBD89E 39B641343D8C104B2B146DC3F9C39DC0B9698544 F1F692238FBC1666E5A5CCD4199F9DFEF6FFBAFD
ENV PHP_VERSION 8.1.29 ARG PHP_VERSION
ENV PHP_URL="https://www.php.net/get/php-8.1.29.tar.xz/from/this/mirror" PHP_ASC_URL="https://www.php.net/get/php-8.1.29.tar.xz.asc/from/this/mirror" ARG PHP_SHA256
ENV PHP_SHA256="288884af60581d4284baba2ace9ca6d646f72facbd3e3c2dd2acc7fe6f903536" PHP_MD5=""
ENV PHP_VERSION ${PHP_VERSION}
ENV PHP_URL="https://www.php.net/get/php-${PHP_VERSION}.tar.xz/from/this/mirror" PHP_ASC_URL="https://www.php.net/get/php-${PHP_VERSION}.tar.xz.asc/from/this/mirror" PHP_MD5=""
ENV PHP_SHA256 ${PHP_SHA256}
RUN set -eux; \ RUN set -eux; \
\ \
@ -155,8 +158,6 @@ COPY images/runtime/php/8.1/docker-php-source /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-php-source RUN chmod +x /usr/local/bin/docker-php-source
RUN set -eux; \ RUN set -eux; \
\
savedAptMark="$(apt-mark showmanual)"; \ savedAptMark="$(apt-mark showmanual)"; \
apt-get update; \ apt-get update; \
apt-get install -y --no-install-recommends \ apt-get install -y --no-install-recommends \

Просмотреть файл

@ -115,9 +115,11 @@ ENV PHP_LDFLAGS="-Wl,-O1 -Wl,--hash-style=both -pie"
ENV GPG_KEYS 528995BFEDFBA7191D46839EF9BA0ADA31CBD89E 39B641343D8C104B2B146DC3F9C39DC0B9698544 F1F692238FBC1666E5A5CCD4199F9DFEF6FFBAFD ENV GPG_KEYS 528995BFEDFBA7191D46839EF9BA0ADA31CBD89E 39B641343D8C104B2B146DC3F9C39DC0B9698544 F1F692238FBC1666E5A5CCD4199F9DFEF6FFBAFD
ENV PHP_VERSION 8.1.29 ARG PHP_VERSION
ENV PHP_URL="https://www.php.net/get/php-8.1.29.tar.xz/from/this/mirror" PHP_ASC_URL="https://www.php.net/get/php-8.1.29.tar.xz.asc/from/this/mirror" ARG PHP_SHA256
ENV PHP_SHA256="288884af60581d4284baba2ace9ca6d646f72facbd3e3c2dd2acc7fe6f903536" PHP_MD5="" ENV PHP_VERSION ${PHP_VERSION}
ENV PHP_URL="https://www.php.net/get/php-${PHP_VERSION}.tar.xz/from/this/mirror" PHP_ASC_URL="https://www.php.net/get/php-${PHP_VERSION}.tar.xz.asc/from/this/mirror" PHP_MD5=""
ENV PHP_SHA256 ${PHP_SHA256}
RUN set -eux; \ RUN set -eux; \
\ \
@ -281,8 +283,6 @@ CMD ["apache2-foreground"]
## base dockerfile ## base dockerfile
SHELL ["/bin/bash", "-c"] SHELL ["/bin/bash", "-c"]
ARG PHP_VERSION
ENV PHP_VERSION ${PHP_VERSION}
RUN a2enmod rewrite expires include deflate remoteip headers RUN a2enmod rewrite expires include deflate remoteip headers

Просмотреть файл

@ -115,9 +115,11 @@ ENV PHP_LDFLAGS="-Wl,-O1 -Wl,--hash-style=both -pie"
ENV GPG_KEYS 1198C0117593497A5EC5C199286AF1F9897469DC 39B641343D8C104B2B146DC3F9C39DC0B9698544 E60913E4DF209907D8E30D96659A97C9CF2A795A ENV GPG_KEYS 1198C0117593497A5EC5C199286AF1F9897469DC 39B641343D8C104B2B146DC3F9C39DC0B9698544 E60913E4DF209907D8E30D96659A97C9CF2A795A
ENV PHP_VERSION 8.2.21 ARG PHP_VERSION
ENV PHP_URL="https://www.php.net/get/php-8.2.21.tar.xz/from/this/mirror" PHP_ASC_URL="https://www.php.net/get/php-8.2.21.tar.xz.asc/from/this/mirror" ARG PHP_SHA256
ENV PHP_SHA256="8cc44d51bb2506399ec176f70fe110f0c9e1f7d852a5303a2cd1403402199707" PHP_MD5="" ENV PHP_VERSION ${PHP_VERSION}
ENV PHP_URL="https://www.php.net/get/php-${PHP_VERSION}.tar.xz/from/this/mirror" PHP_ASC_URL="https://www.php.net/get/php-${PHP_VERSION}.tar.xz.asc/from/this/mirror" PHP_MD5=""
ENV PHP_SHA256 ${PHP_SHA256}
RUN set -eux; \ RUN set -eux; \
\ \
@ -279,8 +281,6 @@ CMD ["apache2-foreground"]
## base dockerfile ## base dockerfile
SHELL ["/bin/bash", "-c"] SHELL ["/bin/bash", "-c"]
ARG PHP_VERSION
ENV PHP_VERSION ${PHP_VERSION}
RUN a2enmod rewrite expires include deflate remoteip headers RUN a2enmod rewrite expires include deflate remoteip headers

Просмотреть файл

@ -114,9 +114,11 @@ ENV PHP_LDFLAGS="-Wl,-O1 -Wl,--hash-style=both -pie"
ENV GPG_KEYS 1198C0117593497A5EC5C199286AF1F9897469DC 39B641343D8C104B2B146DC3F9C39DC0B9698544 E60913E4DF209907D8E30D96659A97C9CF2A795A ENV GPG_KEYS 1198C0117593497A5EC5C199286AF1F9897469DC 39B641343D8C104B2B146DC3F9C39DC0B9698544 E60913E4DF209907D8E30D96659A97C9CF2A795A
ENV PHP_VERSION 8.2.21 ARG PHP_VERSION
ENV PHP_URL="https://www.php.net/get/php-8.2.21.tar.xz/from/this/mirror" PHP_ASC_URL="https://www.php.net/get/php-8.2.21.tar.xz.asc/from/this/mirror" ARG PHP_SHA256
ENV PHP_SHA256="8cc44d51bb2506399ec176f70fe110f0c9e1f7d852a5303a2cd1403402199707" PHP_MD5="" ENV PHP_VERSION ${PHP_VERSION}
ENV PHP_URL="https://www.php.net/get/php-${PHP_VERSION}.tar.xz/from/this/mirror" PHP_ASC_URL="https://www.php.net/get/php-${PHP_VERSION}.tar.xz.asc/from/this/mirror" PHP_MD5=""
ENV PHP_SHA256 ${PHP_SHA256}
RUN set -eux; \ RUN set -eux; \
\ \
@ -278,8 +280,6 @@ CMD ["apache2-foreground"]
## base dockerfile ## base dockerfile
SHELL ["/bin/bash", "-c"] SHELL ["/bin/bash", "-c"]
ARG PHP_VERSION
ENV PHP_VERSION ${PHP_VERSION}
RUN a2enmod rewrite expires include deflate remoteip headers RUN a2enmod rewrite expires include deflate remoteip headers

Просмотреть файл

@ -116,9 +116,11 @@ ENV PHP_LDFLAGS="-Wl,-O1 -Wl,--hash-style=both -pie"
ENV GPG_KEYS 1198C0117593497A5EC5C199286AF1F9897469DC AFD8691FDAEDF03BDF6E460563F15A9B715376CA C28D937575603EB4ABB725861C0779DC5C0A9DE4 ENV GPG_KEYS 1198C0117593497A5EC5C199286AF1F9897469DC AFD8691FDAEDF03BDF6E460563F15A9B715376CA C28D937575603EB4ABB725861C0779DC5C0A9DE4
ENV PHP_VERSION 8.3.9 ARG PHP_VERSION
ENV PHP_URL="https://www.php.net/get/php-8.3.9.tar.xz/from/this/mirror" PHP_ASC_URL="https://www.php.net/get/php-8.3.9.tar.xz.asc/from/this/mirror" ARG PHP_SHA256
ENV PHP_SHA256="bf4d7b8ea60a356064f88485278bd6f941a230ec16f0fc401574ce1445ad6c77" PHP_MD5="" ENV PHP_VERSION ${PHP_VERSION}
ENV PHP_URL="https://www.php.net/get/php-${PHP_VERSION}.tar.xz/from/this/mirror" PHP_ASC_URL="https://www.php.net/get/php-${PHP_VERSION}.tar.xz.asc/from/this/mirror" PHP_MD5=""
ENV PHP_SHA256 ${PHP_SHA256}
RUN set -eux; \ RUN set -eux; \
\ \
@ -280,8 +282,7 @@ CMD ["apache2-foreground"]
## base dockerfile ## base dockerfile
SHELL ["/bin/bash", "-c"] SHELL ["/bin/bash", "-c"]
ARG PHP_VERSION
ENV PHP_VERSION ${PHP_VERSION}
RUN a2enmod rewrite expires include deflate remoteip headers RUN a2enmod rewrite expires include deflate remoteip headers

Просмотреть файл

@ -115,9 +115,11 @@ ENV PHP_LDFLAGS="-Wl,-O1 -Wl,--hash-style=both -pie"
ENV GPG_KEYS 1198C0117593497A5EC5C199286AF1F9897469DC AFD8691FDAEDF03BDF6E460563F15A9B715376CA C28D937575603EB4ABB725861C0779DC5C0A9DE4 ENV GPG_KEYS 1198C0117593497A5EC5C199286AF1F9897469DC AFD8691FDAEDF03BDF6E460563F15A9B715376CA C28D937575603EB4ABB725861C0779DC5C0A9DE4
ENV PHP_VERSION 8.3.9 ARG PHP_VERSION
ENV PHP_URL="https://www.php.net/get/php-8.3.9.tar.xz/from/this/mirror" PHP_ASC_URL="https://www.php.net/get/php-8.3.9.tar.xz.asc/from/this/mirror" ARG PHP_SHA256
ENV PHP_SHA256="bf4d7b8ea60a356064f88485278bd6f941a230ec16f0fc401574ce1445ad6c77" PHP_MD5="" ENV PHP_VERSION ${PHP_VERSION}
ENV PHP_URL="https://www.php.net/get/php-${PHP_VERSION}.tar.xz/from/this/mirror" PHP_ASC_URL="https://www.php.net/get/php-${PHP_VERSION}.tar.xz.asc/from/this/mirror" PHP_MD5=""
ENV PHP_SHA256 ${PHP_SHA256}
RUN set -eux; \ RUN set -eux; \
\ \
@ -279,8 +281,6 @@ CMD ["apache2-foreground"]
## base dockerfile ## base dockerfile
SHELL ["/bin/bash", "-c"] SHELL ["/bin/bash", "-c"]
ARG PHP_VERSION
ENV PHP_VERSION ${PHP_VERSION}
RUN a2enmod rewrite expires include deflate remoteip headers RUN a2enmod rewrite expires include deflate remoteip headers

Просмотреть файл

@ -115,9 +115,11 @@ ENV PHP_LDFLAGS="-Wl,-O1 -Wl,--hash-style=both -pie"
ENV GPG_KEYS 1198C0117593497A5EC5C199286AF1F9897469DC AFD8691FDAEDF03BDF6E460563F15A9B715376CA C28D937575603EB4ABB725861C0779DC5C0A9DE4 ENV GPG_KEYS 1198C0117593497A5EC5C199286AF1F9897469DC AFD8691FDAEDF03BDF6E460563F15A9B715376CA C28D937575603EB4ABB725861C0779DC5C0A9DE4
ENV PHP_VERSION 8.3.9 ARG PHP_VERSION
ENV PHP_URL="https://www.php.net/get/php-8.3.9.tar.xz/from/this/mirror" PHP_ASC_URL="https://www.php.net/get/php-8.3.9.tar.xz.asc/from/this/mirror" ARG PHP_SHA256
ENV PHP_SHA256="bf4d7b8ea60a356064f88485278bd6f941a230ec16f0fc401574ce1445ad6c77" PHP_MD5="" ENV PHP_VERSION ${PHP_VERSION}
ENV PHP_URL="https://www.php.net/get/php-${PHP_VERSION}.tar.xz/from/this/mirror" PHP_ASC_URL="https://www.php.net/get/php-${PHP_VERSION}.tar.xz.asc/from/this/mirror" PHP_MD5=""
ENV PHP_SHA256$ {PHP_SHA256}
RUN set -eux; \ RUN set -eux; \
\ \
@ -280,9 +282,6 @@ CMD ["apache2-foreground"]
## base dockerfile ## base dockerfile
SHELL ["/bin/bash", "-c"] SHELL ["/bin/bash", "-c"]
ARG PHP_VERSION
ENV PHP_VERSION ${PHP_VERSION}
RUN a2enmod rewrite expires include deflate remoteip headers RUN a2enmod rewrite expires include deflate remoteip headers
ENV APACHE_RUN_USER www-data ENV APACHE_RUN_USER www-data

Просмотреть файл

@ -1,9 +0,0 @@
#!/bin/bash
declare -r __DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
source "$__DIR/../../../build/__phpVersions.sh"
# Please make sure that any changes to debian flavors supported here are also reflected in build/constants.yaml
declare -r VERSION_ARRAY_BOOKWORM=($PHP83_VERSION)
declare -r VERSION_ARRAY_BULLSEYE=($PHP74_VERSION $PHP80_VERSION $PHP81_VERSION $PHP82_VERSION $PHP83_VERSION)
declare -r VERSION_ARRAY_BUSTER=($PHP74_VERSION $PHP80_VERSION $PHP81_VERSION $PHP82_VERSION $PHP83_VERSION)

Просмотреть файл

@ -1,49 +0,0 @@
#!/bin/bash
set -ex
declare -r CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
source "$CURRENT_DIR/__versions.sh"
baseImage="oryxdevmcr.azurecr.io/private/oryx/php-run-base"
baseImageDebianFlavor="$1"
PHP_VERSION_ARRAY=()
if [ "$baseImageDebianFlavor" == "bookworm" ];then
PHP_VERSION_ARRAY=("${VERSION_ARRAY_BOOKWORM[@]}")
elif [ "$baseImageDebianFlavor" == "bullseye" ];then
PHP_VERSION_ARRAY=("${VERSION_ARRAY_BULLSEYE[@]}")
elif [ "$baseImageDebianFlavor" == "buster" ];then
PHP_VERSION_ARRAY=("${VERSION_ARRAY_BUSTER[@]}")
fi
echo
echo "Building '$baseImageDebianFlavor' based image '$baseImage'..."
docker build \
-t $baseImage-$baseImageDebianFlavor \
--build-arg DEBIAN_FLAVOR=$baseImageDebianFlavor \
-f "$CURRENT_DIR/runbase.Dockerfile" \
.
echo "*****************"
echo "PHP_VERSION_ARRAY"
echo "${PHP_VERSION_ARRAY[@]}"
echo "*****************"
for PHP_VERSION in "${PHP_VERSION_ARRAY[@]}"
do
IFS='.' read -ra SPLIT_VERSION <<< "$PHP_VERSION"
VERSION_DIRECTORY="${SPLIT_VERSION[0]}.${SPLIT_VERSION[1]}"
PHP_IMAGE_NAME="oryxdevmcr.azurecr.io/private/oryx/php-$VERSION_DIRECTORY-$baseImageDebianFlavor"
cd "$CURRENT_DIR/$VERSION_DIRECTORY/"
echo
echo "Building '$baseImageDebianFlavor' based php image '$PHP_IMAGE_NAME'..."
echo
docker build \
-t $PHP_IMAGE_NAME \
--build-arg DEBIAN_FLAVOR=$baseImageDebianFlavor \
-f "$VERSION_DIRECTORY.$baseImageDebianFlavor.Dockerfile" \
.
done

Просмотреть файл

@ -45,8 +45,8 @@ ARG PYTHON_MAJOR_VERSION
ENV PYTHON_VERSION ${PYTHON_FULL_VERSION} ENV PYTHON_VERSION ${PYTHON_FULL_VERSION}
RUN true RUN true
COPY build/__pythonVersions.sh ${BUILD_DIR} # COPY build/__pythonVersions.sh ${BUILD_DIR}
RUN true # RUN true
COPY platforms/__common.sh /tmp/ COPY platforms/__common.sh /tmp/
RUN true RUN true
COPY platforms/python/prereqs/build.sh /tmp/ COPY platforms/python/prereqs/build.sh /tmp/

Просмотреть файл

@ -3,10 +3,13 @@ FROM mcr.microsoft.com/mirror/docker/library/buildpack-deps:${DEBIAN_FLAVOR} AS
ARG DEBIAN_FLAVOR ARG DEBIAN_FLAVOR
ENV DEBIAN_FLAVOR=$DEBIAN_FLAVOR ENV DEBIAN_FLAVOR=$DEBIAN_FLAVOR
COPY platforms/php/prereqs /php COPY platforms/php/prereqs /php
COPY build/__phpVersions.sh /php/
COPY platforms/php/prereqs/build.sh /tmp/ COPY platforms/php/prereqs/build.sh /tmp/
COPY images/receiveGpgKeys.sh /tmp/receiveGpgKeys.sh COPY images/receiveGpgKeys.sh /tmp/receiveGpgKeys.sh
ARG PHP81_VERSION='8.1.29'
ARG PHP81_KEYS='528995BFEDFBA7191D46839EF9BA0ADA31CBD89E 39B641343D8C104B2B146DC3F9C39DC0B9698544'
ARG PHP81_TAR_SHA256='288884af60581d4284baba2ace9ca6d646f72facbd3e3c2dd2acc7fe6f903536'
RUN if [ "${DEBIAN_FLAVOR}" = "stretch" ]; then \ RUN if [ "${DEBIAN_FLAVOR}" = "stretch" ]; then \
sed -i 's/^deb http:\/\/deb.debian.org\/debian stretch-updates/# deb http:\/\/deb.debian.org\/debian stretch-updates/g' /etc/apt/sources.list \ sed -i 's/^deb http:\/\/deb.debian.org\/debian stretch-updates/# deb http:\/\/deb.debian.org\/debian stretch-updates/g' /etc/apt/sources.list \
&& sed -i 's/^deb http:\/\/security.debian.org\/debian-security stretch/deb http:\/\/archive.debian.org\/debian-security stretch/g' /etc/apt/sources.list \ && sed -i 's/^deb http:\/\/security.debian.org\/debian-security stretch/deb http:\/\/archive.debian.org\/debian-security stretch/g' /etc/apt/sources.list \
@ -35,7 +38,7 @@ COPY build /tmp/build
RUN chmod +x /tmp/platforms/**/*.sh RUN chmod +x /tmp/platforms/**/*.sh
RUN chmod +x /tmp/build/**/*.sh RUN chmod +x /tmp/build/**/*.sh
RUN mkdir /tmp/sdk RUN mkdir /tmp/sdk
RUN /tmp/platforms/php/buildPhp.sh ${DEBIAN_FLAVOR} "" "php" RUN PHP81_VERSION=${PHP81_VERSION} PHP81_KEYS=${PHP81_KEYS} PHP81_TAR_SHA256=${PHP81_TAR_SHA256} /tmp/platforms/php/buildPhp.sh ${DEBIAN_FLAVOR} "" "php"
# ARG PHP_VERSION # ARG PHP_VERSION
# ARG GPG_KEYS # ARG GPG_KEYS

Просмотреть файл

@ -9,12 +9,13 @@ set -ex
declare -r REPO_DIR=$( cd $( dirname "$0" ) && cd .. && cd .. && pwd ) declare -r REPO_DIR=$( cd $( dirname "$0" ) && cd .. && cd .. && pwd )
source $REPO_DIR/platforms/__common.sh source $REPO_DIR/platforms/__common.sh
source $REPO_DIR/build/__phpVersions.sh # source $REPO_DIR/build/__phpVersions.sh
debianFlavor=$1 debianFlavor=$1
sdkStorageAccountUrl="$2" sdkStorageAccountUrl="$2"
phpType=$3 phpType=$3
phpPlatformDir="$REPO_DIR/platforms/php" phpPlatformDir="$REPO_DIR/platforms/php"
buildPhp() { buildPhp() {
local version="$1" local version="$1"
local sha="$2" local sha="$2"
@ -114,7 +115,7 @@ buildPhpComposer() {
set -ex set -ex
composerDir="/opt/php-composer/$version" composerDir="/opt/php-composer/$version"
mkdir -p "$composerDir" mkdir -p "$composerDir"
export phpbin="/opt/php/$PHP81_VERSION/bin/php" export phpbin="/opt/php/$PHP_VERSION/bin/php"
$phpbin /tmp/platforms/php/composer-setup.php --version=$version --install-dir="$composerDir" $phpbin /tmp/platforms/php/composer-setup.php --version=$version --install-dir="$composerDir"
compressedSdkDir="/tmp/compressedSdk/php-composer" compressedSdkDir="/tmp/compressedSdk/php-composer"
mkdir -p "$compressedSdkDir" mkdir -p "$compressedSdkDir"

Просмотреть файл

@ -3,10 +3,14 @@ FROM mcr.microsoft.com/mirror/docker/library/buildpack-deps:${DEBIAN_FLAVOR} AS
ARG DEBIAN_FLAVOR ARG DEBIAN_FLAVOR
ENV DEBIAN_FLAVOR=$DEBIAN_FLAVOR ENV DEBIAN_FLAVOR=$DEBIAN_FLAVOR
COPY platforms/php/prereqs /php COPY platforms/php/prereqs /php
COPY build/__phpVersions.sh /php/ # COPY build/__phpVersions.sh /php/
COPY platforms/php/prereqs/build.sh /tmp/ COPY platforms/php/prereqs/build.sh /tmp/
COPY images/receiveGpgKeys.sh /tmp/receiveGpgKeys.sh COPY images/receiveGpgKeys.sh /tmp/receiveGpgKeys.sh
ARG PHP81_VERSION='8.1.29'
ARG PHP81_KEYS='528995BFEDFBA7191D46839EF9BA0ADA31CBD89E 39B641343D8C104B2B146DC3F9C39DC0B9698544'
ARG PHP81_TAR_SHA256='288884af60581d4284baba2ace9ca6d646f72facbd3e3c2dd2acc7fe6f903536'
RUN if [ "${DEBIAN_FLAVOR}" = "stretch" ]; then \ RUN if [ "${DEBIAN_FLAVOR}" = "stretch" ]; then \
sed -i 's/^deb http:\/\/deb.debian.org\/debian stretch-updates/# deb http:\/\/deb.debian.org\/debian stretch-updates/g' /etc/apt/sources.list \ sed -i 's/^deb http:\/\/deb.debian.org\/debian stretch-updates/# deb http:\/\/deb.debian.org\/debian stretch-updates/g' /etc/apt/sources.list \
&& sed -i 's/^deb http:\/\/security.debian.org\/debian-security stretch/deb http:\/\/archive.debian.org\/debian-security stretch/g' /etc/apt/sources.list \ && sed -i 's/^deb http:\/\/security.debian.org\/debian-security stretch/deb http:\/\/archive.debian.org\/debian-security stretch/g' /etc/apt/sources.list \
@ -35,7 +39,7 @@ COPY build /tmp/build
RUN chmod +x /tmp/platforms/**/*.sh RUN chmod +x /tmp/platforms/**/*.sh
RUN chmod +x /tmp/build/**/*.sh RUN chmod +x /tmp/build/**/*.sh
RUN mkdir /tmp/sdk RUN mkdir /tmp/sdk
RUN /tmp/platforms/php/buildPhp.sh ${DEBIAN_FLAVOR} "" "php-composer" RUN PHP81_VERSION=${PHP81_VERSION} PHP81_KEYS=${PHP81_KEYS} PHP81_TAR_SHA256=${PHP81_TAR_SHA256} /tmp/platforms/php/buildPhp.sh ${DEBIAN_FLAVOR} "" "php-composer"
# ARG PHP_VERSION # ARG PHP_VERSION
# ARG GPG_KEYS # ARG GPG_KEYS

Просмотреть файл

@ -3,7 +3,7 @@ FROM mcr.microsoft.com/mirror/docker/library/buildpack-deps:${DEBIAN_FLAVOR} AS
ARG DEBIAN_FLAVOR ARG DEBIAN_FLAVOR
ENV DEBIAN_FLAVOR=$DEBIAN_FLAVOR ENV DEBIAN_FLAVOR=$DEBIAN_FLAVOR
COPY platforms/php/prereqs /php COPY platforms/php/prereqs /php
COPY build/__phpVersions.sh /php/ # COPY build/__phpVersions.sh /php/
COPY platforms/php/prereqs/build.sh /tmp/ COPY platforms/php/prereqs/build.sh /tmp/
COPY images/receiveGpgKeys.sh /tmp/receiveGpgKeys.sh COPY images/receiveGpgKeys.sh /tmp/receiveGpgKeys.sh

Просмотреть файл

@ -4,7 +4,7 @@ FROM mcr.microsoft.com/mirror/docker/library/buildpack-deps:${DEBIAN_FLAVOR}
ARG DEBIAN_FLAVOR ARG DEBIAN_FLAVOR
ENV DEBIAN_FLAVOR=$DEBIAN_FLAVOR ENV DEBIAN_FLAVOR=$DEBIAN_FLAVOR
COPY build/__pythonVersions.sh /tmp/ # COPY build/__pythonVersions.sh /tmp/
COPY platforms/python/prereqs/build.sh /tmp/ COPY platforms/python/prereqs/build.sh /tmp/
COPY images/receiveGpgKeys.sh /tmp/receiveGpgKeys.sh COPY images/receiveGpgKeys.sh /tmp/receiveGpgKeys.sh

Просмотреть файл

@ -9,7 +9,6 @@ set -e
declare -r REPO_DIR=$( cd $( dirname "$0" ) && cd .. && cd .. && pwd ) declare -r REPO_DIR=$( cd $( dirname "$0" ) && cd .. && cd .. && pwd )
source $REPO_DIR/platforms/__common.sh source $REPO_DIR/platforms/__common.sh
source $REPO_DIR/build/__pythonVersions.sh
pythonPlatformDir="$REPO_DIR/platforms/python" pythonPlatformDir="$REPO_DIR/platforms/python"
targetDir="/tmp/compressedSdk/python" targetDir="/tmp/compressedSdk/python"

Просмотреть файл

@ -8,7 +8,7 @@ ARG DEBIAN_HACK_FLAVOR
ENV DEBIAN_FLAVOR=$DEBIAN_FLAVOR ENV DEBIAN_FLAVOR=$DEBIAN_FLAVOR
ENV DEBIAN_HACK_FLAVOR=$DEBIAN_HACK_FLAVOR ENV DEBIAN_HACK_FLAVOR=$DEBIAN_HACK_FLAVOR
COPY build/__pythonVersions.sh /tmp/ # COPY build/__pythonVersions.sh /tmp/
COPY platforms/python/prereqs/build.sh /tmp/ COPY platforms/python/prereqs/build.sh /tmp/
COPY images/receiveGpgKeys.sh /tmp/receiveGpgKeys.sh COPY images/receiveGpgKeys.sh /tmp/receiveGpgKeys.sh

Просмотреть файл

@ -1,90 +0,0 @@
#!/bin/bash
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
# --------------------------------------------------------------------------------------------
set -ex
declare -r REPO_DIR=$( cd $( dirname "$0" ) && cd .. && cd .. && pwd )
source $REPO_DIR/platforms/__common.sh
source $REPO_DIR/build/__rubyVersions.sh
rubyPlatformDir="$REPO_DIR/platforms/ruby"
targetDir="$volumeHostDir/ruby"
debianFlavor=$1
sdkStorageAccountUrl="$2"
mkdir -p "$targetDir"
builtRubyPrereqs=false
buildRubyPrereqsImage() {
if ! $builtRubyPrereqs; then
echo "Building Ruby pre-requisites image..."
echo
docker build \
--build-arg DEBIAN_FLAVOR=$debianFlavor \
-f "$rubyPlatformDir/prereqs/Dockerfile" \
-t "oryxdevmcr.azurecr.io/private/oryx/ruby-build-prereqs" $REPO_DIR
builtRubyPrereqs=true
fi
}
buildRuby() {
local version="$1"
local sha="$2"
local imageName="oryx/ruby"
local rubySdkFileName=""
local metadataFile=""
local sdkVersionMetadataName=""
if [ "$debianFlavor" == "stretch" ]; then
# Use default python sdk file name
rubySdkFileName=ruby-$version.tar.gz
metadataFile="$targetDir/ruby-$version-metadata.txt"
# Continue adding the version metadata with the name of Version
# which is what our legacy CLI will use
sdkVersionMetadataName="$LEGACY_SDK_VERSION_METADATA_NAME"
cp "$rubyPlatformDir/versions/$debianFlavor/defaultVersion.txt" "$targetDir/defaultVersion.txt"
else
rubySdkFileName=ruby-$debianFlavor-$version.tar.gz
metadataFile="$targetDir/ruby-$debianFlavor-$version-metadata.txt"
sdkVersionMetadataName="$SDK_VERSION_METADATA_NAME"
fi
if shouldBuildSdk ruby $rubySdkFileName $sdkStorageAccountUrl || shouldOverwriteSdk || shouldOverwritePlatformSdk ruby; then
if ! $builtRubyPrereqs; then
buildRubyPrereqsImage
fi
echo "Building Ruby version '$version' in a docker image..."
echo
if [ -z "$dockerFile" ]; then
# Use common docker file
dockerFile="$rubyPlatformDir/Dockerfile"
else
dockerFile="$rubyPlatformDir/$dockerFile"
fi
docker build \
-f "$rubyPlatformDir/Dockerfile" \
--build-arg RUBY_VERSION=$version \
--build-arg RUBY_SHA256=$sha \
--build-arg GEM_VERSION=$GEM_VERSION \
-t $imageName \
$REPO_DIR
getSdkFromImage $imageName "$targetDir"
echo "$sdkVersionMetadataName=$version" >> $metadataFile
echo "$OS_TYPE_METADATA_NAME=$debianFlavor" >> $metadataFile
fi
}
echo "Building Ruby..."
echo
buildPlatform "$rubyPlatformDir/versions/$debianFlavor/versionsToBuild.txt" buildRuby
# Write the default version
cp "$rubyPlatformDir/versions/$debianFlavor/defaultVersion.txt" "$targetDir/defaultVersion.$debianFlavor.txt"

Просмотреть файл

@ -1,8 +0,0 @@
# Install Ruby build prerequisites
ARG DEBIAN_FLAVOR
FROM buildpack-deps:${DEBIAN_FLAVOR} AS ruby-buildpack-prereqs
ARG DEBIAN_FLAVOR
ENV DEBIAN_FLAVOR=$DEBIAN_FLAVOR
COPY build/__rubyVersions.sh /tmp/
COPY platforms/ruby/prereqs/build.sh /tmp/
RUN chmod +x /tmp/build.sh

Просмотреть файл

@ -30,13 +30,13 @@ namespace Microsoft.Oryx.Integration.Tests
await CanBuildAndRunAppUsingDynamicInstallationOfRuntimeInRuntimeImageAsync(NodeVersions.Node14Version); await CanBuildAndRunAppUsingDynamicInstallationOfRuntimeInRuntimeImageAsync(NodeVersions.Node14Version);
} }
[Fact] // [Fact]
[Trait("category", "node-16")] // [Trait("category", "node-16")]
[Trait("build-image", "github-actions-debian-buster")] // [Trait("build-image", "github-actions-debian-buster")]
public async Task CanBuildAndRunNode16AppUsingDynamicInstallationOfRuntimeInRuntimeImageAsync() // public async Task CanBuildAndRunNode16AppUsingDynamicInstallationOfRuntimeInRuntimeImageAsync()
{ // {
await CanBuildAndRunAppUsingDynamicInstallationOfRuntimeInRuntimeImageAsync(NodeVersions.Node16Version); // await CanBuildAndRunAppUsingDynamicInstallationOfRuntimeInRuntimeImageAsync(NodeVersions.Node16Version);
} // }
private async Task CanBuildAndRunAppUsingDynamicInstallationOfRuntimeInRuntimeImageAsync(string nodeVersion) private async Task CanBuildAndRunAppUsingDynamicInstallationOfRuntimeInRuntimeImageAsync(string nodeVersion)
{ {