Publish platform binaries to Azure storage and use them in building build and runtime images (#461)

This commit is contained in:
Kiran 2020-01-29 11:26:22 -08:00 коммит произвёл GitHub
Родитель 922b909b1d
Коммит 8572482fb9
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
89 изменённых файлов: 1833 добавлений и 575 удалений

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

@ -1,6 +1,6 @@
# This file was auto-generated from 'constants.yaml'. Changes may be overridden.
DOT_NET_CORE_RUNTIME_BASE_TAG='20200121.5'
DOT_NET_CORE_RUNTIME_BASE_TAG='20200129.1'
NET_CORE_APP_10='1.0.16'
NET_CORE_APP_11='1.1.13'
NET_CORE_APP_20='2.0.9'

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

@ -1,7 +1,7 @@
# This file was auto-generated from 'constants.yaml'. Changes may be overridden.
NODE_RUNTIME_BASE_TAG='20200121.9'
YARN_CACHE_BASE_TAG='20200121.9'
NODE_RUNTIME_BASE_TAG='20200129.1'
YARN_CACHE_BASE_TAG='20200129.1'
YARN_VERSION='1.17.3'
YARN_MINOR_VERSION='1.17'
YARN_MAJOR_VERSION='1'

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

@ -1,8 +1,8 @@
# This file was auto-generated from 'constants.yaml'. Changes may be overridden.
PHP_BUILD_BASE_TAG='20200128.2'
PHP_RUNTIME_BASE_TAG='20200128.2'
PHP_FPM_RUNTIME_BASE_TAG='20200128.2'
PHP_BUILD_BASE_TAG='20200129.1'
PHP_RUNTIME_BASE_TAG='20200129.1'
PHP_FPM_RUNTIME_BASE_TAG='20200129.1'
COMPOSER_VERSION='1.9.2'
COMPOSER_SHA384='c5b9b6d368201a9db6f74e2611495f369991b72d9c8cbd3ffbc63edff210eb73d46ffbfce88669ad33695ef77dc76976'
PHP73_VERSION='7.3.13'

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

@ -1,6 +1,6 @@
# This file was auto-generated from 'constants.yaml'. Changes may be overridden.
PYTHON_BASE_TAG='20200121.5'
PYTHON_BASE_TAG='20200129.1'
PIP_VERSION='19.3.1'
PYTHON27_VERSION='2.7.17'
PYTHON36_VERSION='3.6.10'

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

@ -1,26 +1,35 @@
#!/bin/bash
set -e
declare -r __REPO_DIR=$( cd $( dirname "$0" ) && cd .. && pwd )
# Since this file is expected to be 'sourced' from any script under any folder in this repo,
# we cannot get the repo directory from this file itself and instead rely on the parent script
# which does the sourcing.
if [ -z "$REPO_DIR" ]; then
"The variable 'REPO_DIR' cannot be empty. It should point to repo root."
exit 1
fi
# sentinel variable to indicate that this file is loaded. Useful for files which source this.
declare -r _LOADED_COMMON_VARIABLES="true"
# VSTS environment variables
declare -r BUILD_NUMBER="$BUILD_BUILDNUMBER"
declare -r BUILD_CONFIGURATION="${BUILDCONFIGURATION:-Debug}"
declare -r RELEASE_TAG_NAME="${RELEASE_TAG_NAME:-$BUILD_NUMBER}"
declare -r BUILD_IMAGES_BUILD_CONTEXT_DIR="$__REPO_DIR/"
declare -r BUILD_IMAGES_DOCKERFILE="$__REPO_DIR/images/build/Dockerfile"
declare -r BUILD_IMAGES_SLIM_DOCKERFILE="$__REPO_DIR/images/build/slim.Dockerfile"
declare -r PACK_IMAGE_DOCKERFILE="$__REPO_DIR/images/pack-builder/pack-runner.Dockerfile"
declare -r ORYXTESTS_BUILDIMAGE_DOCKERFILE="$__REPO_DIR/tests/images/build/Dockerfile"
declare -r ORYXTESTS_SLIM_BUILDIMAGE_DOCKERFILE="$__REPO_DIR/tests/images/build/slim.Dockerfile"
declare -r RUNTIME_IMAGES_SRC_DIR="$__REPO_DIR/images/runtime"
declare -r BUILD_IMAGES_BUILD_CONTEXT_DIR="$REPO_DIR/"
declare -r BUILD_IMAGES_DOCKERFILE="$REPO_DIR/images/build/Dockerfile"
declare -r BUILD_IMAGES_SLIM_DOCKERFILE="$REPO_DIR/images/build/slim.Dockerfile"
declare -r PACK_IMAGE_DOCKERFILE="$REPO_DIR/images/pack-builder/pack-runner.Dockerfile"
declare -r ORYXTESTS_BUILDIMAGE_DOCKERFILE="$REPO_DIR/tests/images/build/Dockerfile"
declare -r ORYXTESTS_SLIM_BUILDIMAGE_DOCKERFILE="$REPO_DIR/tests/images/build/slim.Dockerfile"
declare -r RUNTIME_IMAGES_SRC_DIR="$REPO_DIR/images/runtime"
declare -r RUNTIME_BASE_IMAGE_DOCKERFILE_PATH="$RUNTIME_IMAGES_SRC_DIR/commonbase/Dockerfile"
declare -r RUNTIME_BASE_IMAGE_NAME="oryx-run-base"
declare -r SOURCES_SRC_DIR="$__REPO_DIR/src"
declare -r TESTS_SRC_DIR="$__REPO_DIR/tests"
declare -r SOURCES_SRC_DIR="$REPO_DIR/src"
declare -r TESTS_SRC_DIR="$REPO_DIR/tests"
declare -r ARTIFACTS_DIR="$__REPO_DIR/artifacts"
declare -r ARTIFACTS_DIR="$REPO_DIR/artifacts"
declare -r BUILD_IMAGES_ARTIFACTS_FILE="$ARTIFACTS_DIR/images/build-images.txt"
declare -r BASE_IMAGES_ARTIFACTS_FILE_PREFIX="$ARTIFACTS_DIR/images"
declare -r RUNTIME_IMAGES_ARTIFACTS_FILE="$ARTIFACTS_DIR/images/runtime-images.txt"

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

@ -24,7 +24,7 @@ if [ ! -z "$BUILD_NUMBER" ]; then
UNIQUE_TAG="-$BUILD_NUMBER"
fi
BUILD_IMAGES_DIR="$__REPO_DIR/images/build"
BUILD_IMAGES_DIR="$REPO_DIR/images/build"
# NOTE: We create a unique artifacts file per image directory here since they are going to be built in parallel on CI
ARTIFACTS_FILE="$BASE_IMAGES_ARTIFACTS_FILE_PREFIX/$IMAGE_DIR_TO_BUILD-buildimage-bases.txt"
@ -39,7 +39,7 @@ function buildImages() {
versionDir=$(dirname "${dockerFile}")
versionDirName=$(basename $versionDir)
imageName="$BASE_IMAGES_REPO:$dirName-build-$versionDirName$UNIQUE_TAG"
docker build -f $dockerFile -t "$imageName" $__REPO_DIR
docker build -f $dockerFile -t "$imageName" $REPO_DIR
echo "$imageName" >> $ARTIFACTS_FILE
done
}
@ -49,14 +49,14 @@ case $IMAGE_DIR_TO_BUILD in
echo "Building Python base images"
echo
docker build -f $BUILD_IMAGES_DIR/python/prereqs/Dockerfile -t "python-build-prereqs" $__REPO_DIR
docker build -f $BUILD_IMAGES_DIR/python/prereqs/Dockerfile -t "python-build-prereqs" $REPO_DIR
buildImages "python"
;;
'php')
echo "Building PHP base images"
echo
docker build -f $BUILD_IMAGES_DIR/php/prereqs/Dockerfile -t "php-build-prereqs" $__REPO_DIR
docker build -f $BUILD_IMAGES_DIR/php/prereqs/Dockerfile -t "php-build-prereqs" $REPO_DIR
buildImages "php"
;;
'yarn-cache')
@ -64,7 +64,7 @@ case $IMAGE_DIR_TO_BUILD in
echo
imageName="$BASE_IMAGES_REPO:build-yarn-cache$UNIQUE_TAG"
docker build -f $BUILD_IMAGES_DIR/yarn-cache/Dockerfile -t $imageName $__REPO_DIR
docker build -f $BUILD_IMAGES_DIR/yarn-cache/Dockerfile -t $imageName $REPO_DIR
echo "$imageName" >> $ARTIFACTS_FILE
;;
*) echo "Unknown image directory";;

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

@ -4,15 +4,13 @@
# Licensed under the MIT license.
# --------------------------------------------------------------------------------------------
set -e
set -ex
# Enables running from within other scripts that already declared $REPO_DIR
if [ -z "$REPO_DIR" ]; then
if [ -z $REPO_DIR ]; then
declare -r REPO_DIR=$( cd $( dirname "$0" ) && cd .. && pwd )
fi
# Enables running from within other scripts that already sourced __variables.sh
if [ -z "$__REPO_DIR" ]; then
if [ -z $_LOADED_COMMON_VARIABLES ]; then
source $REPO_DIR/build/__variables.sh
fi

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

@ -0,0 +1,28 @@
#!/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 )
PLATFORM_TO_BUILD=$1
platformsDir="$REPO_DIR/platforms"
case $PLATFORM_TO_BUILD in
'dotnet')
"$platformsDir/dotnet/getDotNetSdk.sh"
;;
'python')
"$platformsDir/python/buildPython.sh"
;;
'php')
"$platformsDir/php/buildPhp.sh"
;;
'node')
"$platformsDir/node/getNode.sh"
;;
*) echo "Unknown image directory";;
esac

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

@ -34,7 +34,7 @@
file-name-prefix: __
- name: dot-net-core-run-time-versions
constants:
dot-net-core-runtime-base-tag: 20200121.5
dot-net-core-runtime-base-tag: 20200129.1
net-core-app-10: 1.0.16
net-core-app-11: 1.1.13
net-core-app-20: 2.0.9
@ -51,7 +51,7 @@
file-name-prefix: __
- name: python-versions
constants:
python-base-tag: 20200121.5
python-base-tag: 20200129.1
pip-version: 19.3.1
python27-version: 2.7.17
python36-version: 3.6.10
@ -66,9 +66,9 @@
file-name-prefix: __
- name: php-versions
constants:
php-build-base-tag: 20200128.2
php-runtime-base-tag: 20200128.2
php-fpm-runtime-base-tag: 20200128.2
php-build-base-tag: 20200129.1
php-runtime-base-tag: 20200129.1
php-fpm-runtime-base-tag: 20200129.1
composer-version: 1.9.2
composer-sha384: c5b9b6d368201a9db6f74e2611495f369991b72d9c8cbd3ffbc63edff210eb73d46ffbfce88669ad33695ef77dc76976
# hashes are for .tar.xz
@ -107,8 +107,8 @@
directory: src/startupscriptgenerator/src/common/consts
- name: node-versions
constants:
node-runtime-base-tag: 20200121.9
yarn-cache-base-tag: 20200121.9
node-runtime-base-tag: 20200129.1
yarn-cache-base-tag: 20200129.1
yarn-version: 1.17.3
yarn-minor-version: 1.17
yarn-major-version: 1
@ -122,4 +122,11 @@
file-name-prefix: __
- type: csharp
directory: src/BuildScriptGenerator/Node
namespace: Microsoft.Oryx.BuildScriptGenerator.Node
namespace: Microsoft.Oryx.BuildScriptGenerator.Node
- name: common-constants
constants:
dev-storage-base-url: https://oryxsdksdev.blob.core.windows.net
outputs:
- type: shell
directory: images
file-name-prefix: __

22
images/__common.sh Normal file
Просмотреть файл

@ -0,0 +1,22 @@
__CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
source $__CURRENT_DIR/__commonConstants.sh
function downloadFileAndVerifyChecksum() {
local platformName="$1"
local version="$2"
local downloadedFileName="$3"
local headersFile="/tmp/headers.txt"
echo "Downloading $platformName version '$version'..."
curl \
-D $headersFile \
-SL "$DEV_STORAGE_BASE_URL/$platformName/$platformName-$version.tar.gz" \
--output $downloadedFileName
headerName="x-ms-meta-checksum"
checksumHeader=$(cat $headersFile | grep $headerName: | tr -d '\r')
checksumValue=${checksumHeader#"$headerName: "}
echo
echo "Verifying checksum..."
echo "$checksumValue $downloadedFileName" | sha512sum -c -
}

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

@ -0,0 +1,3 @@
# This file was auto-generated from 'constants.yaml'. Changes may be overridden.
DEV_STORAGE_BASE_URL='https://oryxsdksdev.blob.core.windows.net'

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

@ -1,9 +1,12 @@
ARG IMAGES_DIR=/tmp/oryx/images
ARG BUILD_DIR=/tmp/oryx/build
# Start declaration of Build-Arg to determine where the image is getting built (DevOps agents or local)
ARG AGENTBUILD
ARG PYTHON_BASE_TAG
ARG PHP_BUILD_BASE_TAG
ARG YARN_CACHE_BASE_TAG
FROM oryxdevmcr.azurecr.io/public/oryx/build:slim AS main
ARG IMAGES_DIR
ARG BUILD_DIR
# End declaration of Build-Arg to determine where the image is getting built (DevOps agents or local)
# Configure locale (required for Python)
@ -18,14 +21,19 @@ RUN apt-get update \
libunwind8 \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /tmp/scripts
COPY build/__dotNetCoreSdkVersions.sh /tmp/scripts
COPY build/__dotNetCoreRunTimeVersions.sh /tmp/scripts
COPY images/build/createFlattenedDotNetCoreInstall.sh /tmp/scripts
RUN chmod +x /tmp/scripts/createFlattenedDotNetCoreInstall.sh
# A temporary folder to hold all content temporarily used to build this image.
# This folder is deleted in the final stage of building this image.
RUN mkdir -p ${IMAGES_DIR}
RUN mkdir -p ${BUILD_DIR}
ADD build ${BUILD_DIR}
ADD images ${IMAGES_DIR}
RUN find ${IMAGES_DIR} -type f -iname "*.sh" -exec chmod +x {} \;
RUN find ${BUILD_DIR} -type f -iname "*.sh" -exec chmod +x {} \;
# Install .NET Core
FROM main AS dotnet-install
ARG BUILD_DIR
ARG IMAGES_DIR
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y --no-install-recommends \
@ -35,28 +43,21 @@ RUN apt-get update \
libunwind8 \
&& rm -rf /var/lib/apt/lists/*
COPY images/build/installDotNetCore.sh /tmp/scripts
RUN chmod +x /tmp/scripts/installDotNetCore.sh
# Check https://www.microsoft.com/net/platform/support-policy for support policy of .NET Core versions
RUN . /tmp/scripts/__dotNetCoreSdkVersions.sh && \
RUN . ${BUILD_DIR}/__dotNetCoreSdkVersions.sh && \
DOTNET_SDK_VER=$DOT_NET_CORE_11_SDK_VERSION \
DOTNET_SDK_SHA=$DOT_NET_CORE_11_SDK_SHA512 \
DOTNET_SDK_URL=https://dotnetcli.blob.core.windows.net/dotnet/Sdk/$DOTNET_SDK_VER/dotnet-dev-debian.9-x64.$DOTNET_SDK_VER.tar.gz \
# To save disk space do not install packages for this old version which is soon going to be out of support
INSTALL_PACKAGES=false \
/tmp/scripts/installDotNetCore.sh
${IMAGES_DIR}/build/installDotNetCore.sh
RUN . /tmp/scripts/__dotNetCoreSdkVersions.sh && \
RUN . ${BUILD_DIR}/__dotNetCoreSdkVersions.sh && \
DOTNET_SDK_VER=$DOT_NET_CORE_22_SDK_VERSION \
DOTNET_SDK_SHA=$DOT_NET_CORE_22_SDK_SHA512 \
/tmp/scripts/installDotNetCore.sh
${IMAGES_DIR}/build/installDotNetCore.sh
RUN . /tmp/scripts/__dotNetCoreSdkVersions.sh && \
RUN . ${BUILD_DIR}/__dotNetCoreSdkVersions.sh && \
DOTNET_SDK_VER=$DOT_NET_CORE_30_SDK_VERSION \
DOTNET_SDK_SHA=$DOT_NET_CORE_30_SDK_SHA512 \
/tmp/scripts/installDotNetCore.sh
${IMAGES_DIR}/build/installDotNetCore.sh
RUN set -ex \
rm -rf /tmp/NuGetScratch \
@ -73,8 +74,8 @@ RUN set -ex \
&& sdksDir=$dotnetDir/sdks \
&& runtimesDir=$dotnetDir/runtimes \
&& cd $runtimesDir \
&& . /tmp/scripts/__dotNetCoreSdkVersions.sh \
&& . /tmp/scripts/__dotNetCoreRunTimeVersions.sh \
&& . ${BUILD_DIR}/__dotNetCoreSdkVersions.sh \
&& . ${BUILD_DIR}/__dotNetCoreRunTimeVersions.sh \
# 1.1 sdk <-- 1.0 runtime's sdk
&& mkdir $NET_CORE_APP_10 \
&& ln -s $NET_CORE_APP_10 1.0 \
@ -98,45 +99,40 @@ RUN set -ex \
&& ln -s $sdksDir/$DOT_NET_CORE_30_SDK_VERSION $NET_CORE_APP_30/sdk
# Install Node.js, NPM, Yarn
FROM buildpack-deps:stretch AS node-install
FROM main AS node-install
ARG BUILD_DIR
ARG IMAGES_DIR
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y --no-install-recommends \
jq \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /tmp/scripts
COPY build/__nodeVersions.sh /tmp/scripts
RUN chmod a+x /tmp/scripts/__nodeVersions.sh \
&& . /tmp/scripts/__nodeVersions.sh \
&& curl -sL https://git.io/n-install | bash -s -- -ny - \
&& ~/n/bin/n -d 4.4.7 \
&& ~/n/bin/n -d 4.5.0 \
&& ~/n/bin/n -d 4.8.0 \
&& ~/n/bin/n -d 6.2.2 \
&& ~/n/bin/n -d 6.6.0 \
&& ~/n/bin/n -d 6.9.3 \
&& ~/n/bin/n -d 6.10.3 \
&& ~/n/bin/n -d 6.11.0 \
&& ~/n/bin/n -d 8.0.0 \
&& ~/n/bin/n -d 8.1.4 \
&& ~/n/bin/n -d 8.2.1 \
&& ~/n/bin/n -d 8.8.1 \
&& ~/n/bin/n -d 8.9.4 \
&& ~/n/bin/n -d 8.11.2 \
&& ~/n/bin/n -d 8.12.0 \
&& ~/n/bin/n -d 8.15.1 \
&& ~/n/bin/n -d 9.4.0 \
&& ~/n/bin/n -d 10.1.0 \
&& ~/n/bin/n -d 10.10.0 \
&& ~/n/bin/n -d 10.14.2 \
&& ~/n/bin/n -d 10.16.3 \
&& ~/n/bin/n -d 12.9.1 \
&& ~/n/bin/n -d $NODE6_VERSION \
&& mv /usr/local/n/versions/node /opt/nodejs \
&& rm -rf /usr/local/n ~/n
COPY images/build/installNpm.sh /tmp/scripts
RUN chmod +x /tmp/scripts/installNpm.sh
RUN /tmp/scripts/installNpm.sh
RUN cd ${IMAGES_DIR} \
&& . ${BUILD_DIR}/__nodeVersions.sh \
&& ./installPlatform.sh nodejs 4.4.7 \
&& ./installPlatform.sh nodejs 4.5.0 \
&& ./installPlatform.sh nodejs 4.8.0 \
&& ./installPlatform.sh nodejs 6.2.2 \
&& ./installPlatform.sh nodejs 6.6.0 \
&& ./installPlatform.sh nodejs 6.9.3 \
&& ./installPlatform.sh nodejs 6.10.3 \
&& ./installPlatform.sh nodejs 6.11.0 \
&& ./installPlatform.sh nodejs 8.0.0 \
&& ./installPlatform.sh nodejs 8.1.4 \
&& ./installPlatform.sh nodejs 8.2.1 \
&& ./installPlatform.sh nodejs 8.8.1 \
&& ./installPlatform.sh nodejs 8.9.4 \
&& ./installPlatform.sh nodejs 8.11.2 \
&& ./installPlatform.sh nodejs 8.12.0 \
&& ./installPlatform.sh nodejs 8.15.1 \
&& ./installPlatform.sh nodejs 9.4.0 \
&& ./installPlatform.sh nodejs 10.1.0 \
&& ./installPlatform.sh nodejs 10.10.0 \
&& ./installPlatform.sh nodejs 10.14.2 \
&& ./installPlatform.sh nodejs 10.16.3 \
&& ./installPlatform.sh nodejs 12.9.1 \
&& ./installPlatform.sh nodejs $NODE6_VERSION
RUN ${IMAGES_DIR}/build/installNpm.sh
RUN set -ex \
&& ln -s 4.4.7 /opt/nodejs/4.4 \
@ -163,7 +159,7 @@ RUN set -ex \
&& ln -s 10.14.2 /opt/nodejs/10.14 \
&& ln -s 10.16.3 /opt/nodejs/10.16 \
&& ln -s 12.9.1 /opt/nodejs/12.9 \
&& . /tmp/scripts/__nodeVersions.sh \
&& . ${BUILD_DIR}/__nodeVersions.sh \
&& ln -s $NODE6_VERSION /opt/nodejs/6
RUN set -ex \
&& ln -s 2.15.9 /opt/npm/2.15 \
@ -177,27 +173,20 @@ RUN set -ex \
&& ln -s 5.6.0 /opt/npm/5.6 \
&& ln -s 5.6 /opt/npm/5
###
# Python intermediate stages
# Docker doesn't support variables in `COPY --from`, so we're using intermediate stages
###
FROM mcr.microsoft.com/oryx/base:python-build-2.7-${PYTHON_BASE_TAG} AS py27-build-base
FROM mcr.microsoft.com/oryx/base:python-build-3.6-${PYTHON_BASE_TAG} AS py36-build-base
###
# End Python intermediate stages
###
FROM main AS python
ARG BUILD_DIR
ARG IMAGES_DIR
# https://github.com/docker-library/python/issues/147
ENV PYTHONIOENCODING UTF-8
COPY build/__pythonVersions.sh /tmp/scripts
COPY --from=py27-build-base /opt /opt
COPY --from=py36-build-base /opt /opt
RUN . /tmp/scripts/__pythonVersions.sh && set -ex \
RUN cd ${IMAGES_DIR} \
&& . ${BUILD_DIR}/__pythonVersions.sh \
&& ./installPlatform.sh python $PYTHON27_VERSION \
&& ./installPlatform.sh python $PYTHON36_VERSION
RUN . ${BUILD_DIR}/__pythonVersions.sh && set -ex \
&& [ -d "/opt/python/$PYTHON27_VERSION" ] && echo /opt/python/$PYTHON27_VERSION/lib >> /etc/ld.so.conf.d/python.conf \
&& [ -d "/opt/python/$PYTHON36_VERSION" ] && echo /opt/python/$PYTHON36_VERSION/lib >> /etc/ld.so.conf.d/python.conf \
&& ldconfig
RUN . /tmp/scripts/__pythonVersions.sh && set -ex \
RUN . ${BUILD_DIR}/__pythonVersions.sh && set -ex \
&& ln -s $PYTHON27_VERSION /opt/python/2.7 \
&& ln -s 2.7 /opt/python/2 \
&& ln -s $PYTHON36_VERSION /opt/python/3.6
@ -206,18 +195,6 @@ RUN . /tmp/scripts/__pythonVersions.sh && set -ex \
# stages in buildBuildImages.sh file
FROM dotnet-install AS buildscriptbuilder
###
# PHP intermediate stages
# Docker doesn't support variables in `COPY --from`, so we're using intermediate stages
###
FROM mcr.microsoft.com/oryx/base:php-build-5.6-${PHP_BUILD_BASE_TAG} AS php56-build-base
FROM mcr.microsoft.com/oryx/base:php-build-7.0-${PHP_BUILD_BASE_TAG} AS php70-build-base
FROM mcr.microsoft.com/oryx/base:php-build-7.2-${PHP_BUILD_BASE_TAG} AS php72-build-base
FROM mcr.microsoft.com/oryx/base:php-build-7.3-${PHP_BUILD_BASE_TAG} AS php73-build-base
###
# End PHP intermediate stages
###
FROM mcr.microsoft.com/oryx/base:build-yarn-cache-${YARN_CACHE_BASE_TAG} AS yarn-cache-base
###
@ -245,21 +222,21 @@ RUN ./build.sh python /opt/startupcmdgen/python
###
FROM python AS final
ARG BUILD_DIR
ARG IMAGES_DIR
WORKDIR /
# Copy .NET Core related content
COPY --from=dotnet-install /opt/dotnet /opt/dotnet
COPY --from=dotnet-install /var/nuget /var/nuget
RUN /tmp/scripts/createFlattenedDotNetCoreInstall.sh
COPY images/build/dotNetCoreAll.Readme.md /opt/dotnet/Readme.md
RUN ${IMAGES_DIR}/build/createFlattenedDotNetCoreInstall.sh
RUN cp ${IMAGES_DIR}/build/dotNetCoreAll.Readme.md /opt/dotnet/Readme.md
# Copy NodeJs, NPM and Yarn related content
COPY --from=node-install /opt /opt
# Install PHP pre-reqs
COPY images/build/php/prereqs/installPrereqs.sh /tmp/scripts/installPhpPrereqs.sh
RUN chmod +x /tmp/scripts/installPhpPrereqs.sh
RUN /tmp/scripts/installPhpPrereqs.sh
RUN ${IMAGES_DIR}/build/php/prereqs/installPrereqs.sh
# Oryx depends on the run script generators for most of its
# `IProgrammingPlatform.GenerateBashRunScript()` implementations
@ -267,18 +244,25 @@ COPY --from=startupScriptGens /opt/startupcmdgen/ /opt/startupcmdgen/
COPY --from=yarn-cache-base /usr/local/share/yarn-cache /usr/local/share/yarn-cache
# Copy PHP versions
COPY --from=php56-build-base /opt /opt
COPY --from=php70-build-base /opt /opt
COPY --from=php72-build-base /opt /opt
COPY --from=php73-build-base /opt /opt
RUN cd ${IMAGES_DIR} \
&& . ${BUILD_DIR}/__phpVersions.sh \
&& ./installPlatform.sh php $PHP56_VERSION \
&& ./installPlatform.sh php $PHP70_VERSION \
&& ./installPlatform.sh php $PHP72_VERSION \
&& ./installPlatform.sh php $PHP73_VERSION \
&& ./installPlatform.sh php-composer $COMPOSER_VERSION
RUN ln -s /opt/php/5.6 /opt/php/5 \
&& ln -s /opt/php/7.3 /opt/php/7 \
&& ln -s /opt/php/7 /opt/php/lts
&& ln -s /opt/php/7 /opt/php/lts \
&& cd /opt/php-composer \
&& ln -s 1.9 1 \
&& ln -s 1 stable
RUN ln -s /opt/php-composer/stable/composer.phar /opt/php-composer/composer.phar
ENV PATH="$PATH:/opt/php/lts/bin"
RUN rm -rf /tmp/scripts
RUN rm -rf /tmp/oryx
ARG GIT_COMMIT=unspecified
ARG BUILD_NUMBER=unspecified

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

@ -6,10 +6,9 @@
set -e
declare -r DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
source "$DIR/__dotNetCoreSdkVersions.sh"
source "$DIR/__dotNetCoreRunTimeVersions.sh"
__CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
source "$__CURRENT_DIR/../../build/__dotNetCoreSdkVersions.sh"
source "$__CURRENT_DIR/../../build/__dotNetCoreRunTimeVersions.sh"
splitSdksDir="/opt/dotnet/sdks"

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

@ -6,22 +6,15 @@
set -ex
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
source $CURRENT_DIR/../__common.sh
echo
echo "Installing .NET Core SDK $DOTNET_SDK_VER ..."
echo
# .NET Core 1.1 follows a different pattern for url, so we give a chance for the caller
# to specify a different url
DEFAULT_DOTNET_SDK_URL=https://dotnetcli.blob.core.windows.net/dotnet/Sdk/$DOTNET_SDK_VER/dotnet-sdk-$DOTNET_SDK_VER-linux-x64.tar.gz
DOTNET_SDK_URL="${DOTNET_SDK_URL:-$DEFAULT_DOTNET_SDK_URL}"
curl -SL $DOTNET_SDK_URL --output dotnet.tar.gz
if [ "$DOTNET_SDK_SHA" != "" ]
then
echo
echo "Verifying archive hash..."
echo "$DOTNET_SDK_SHA dotnet.tar.gz" | sha512sum -c -
fi
fileName="dotnet.tar.gz"
downloadFileAndVerifyChecksum dotnet $DOTNET_SDK_VER $fileName
globalJsonContent="{\"sdk\":{\"version\":\"$DOTNET_SDK_VER\"}}"
@ -32,8 +25,8 @@ DOTNET_SDK_VER=${DOTNET_SDK_VER%%-*}
SDK_DIR=/opt/dotnet/sdks
DOTNET_DIR=$SDK_DIR/$DOTNET_SDK_VER
mkdir -p $DOTNET_DIR
tar -xzf dotnet.tar.gz -C $DOTNET_DIR
rm dotnet.tar.gz
tar -xzf $fileName -C $DOTNET_DIR
rm $fileName
# Create a link : major.minor => major.minor.path
IFS='.' read -ra SDK_VERSION_PARTS <<< "$DOTNET_SDK_VER"

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

@ -1,9 +1,13 @@
# Start declaration of Build-Arg to determine where the image is getting built (DevOps agents or local)
# Folders in the image which we use to build this image itself
# These are deleted in the final stage of the build
ARG IMAGES_DIR=/tmp/oryx/images
ARG BUILD_DIR=/tmp/oryx/build
# Determine where the image is getting built (DevOps agents or local)
ARG AGENTBUILD
ARG PYTHON_BASE_TAG
ARG PHP_BUILD_BASE_TAG
FROM buildpack-deps:stretch AS main
# End declaration of Build-Arg to determine where the image is getting built (DevOps agents or local)
ARG BUILD_DIR
ARG IMAGES_DIR
# Configure locale (required for Python)
# NOTE: Do NOT move it from here as it could have global implications
@ -36,15 +40,23 @@ RUN apt-get update \
zip \
&& rm -rf /var/lib/apt/lists/*
# A temporary folder to hold all scripts temporarily used to build this image.
# A temporary folder to hold all content temporarily used to build this image.
# This folder is deleted in the final stage of building this image.
RUN mkdir -p /tmp/scripts
RUN mkdir -p ${IMAGES_DIR}
RUN mkdir -p ${BUILD_DIR}
ADD build ${BUILD_DIR}
ADD images ${IMAGES_DIR}
# chmod all script files
RUN find ${IMAGES_DIR} -type f -iname "*.sh" -exec chmod +x {} \;
RUN find ${BUILD_DIR} -type f -iname "*.sh" -exec chmod +x {} \;
# This is the folder containing 'links' to benv and build script generator
RUN mkdir -p /opt/oryx
# Install .NET Core
FROM main AS dotnet-install
ARG BUILD_DIR
ARG IMAGES_DIR
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y --no-install-recommends \
@ -65,21 +77,15 @@ ENV DOTNET_RUNNING_IN_CONTAINER=true \
NUGET_PACKAGES=/var/nuget
RUN mkdir /var/nuget
COPY build/__dotNetCoreSdkVersions.sh /tmp/scripts
COPY build/__dotNetCoreRunTimeVersions.sh /tmp/scripts
COPY images/build/installDotNetCore.sh /tmp/scripts
RUN chmod +x /tmp/scripts/installDotNetCore.sh
# Check https://www.microsoft.com/net/platform/support-policy for support policy of .NET Core versions
RUN . /tmp/scripts/__dotNetCoreSdkVersions.sh && \
RUN . ${BUILD_DIR}/__dotNetCoreSdkVersions.sh && \
DOTNET_SDK_VER=$DOT_NET_CORE_21_SDK_VERSION \
DOTNET_SDK_SHA=$DOT_NET_CORE_21_SDK_SHA512 \
/tmp/scripts/installDotNetCore.sh
${IMAGES_DIR}/build/installDotNetCore.sh
RUN . /tmp/scripts/__dotNetCoreSdkVersions.sh && \
RUN . ${BUILD_DIR}/__dotNetCoreSdkVersions.sh && \
DOTNET_SDK_VER=$DOT_NET_CORE_31_SDK_VERSION \
DOTNET_SDK_SHA=$DOT_NET_CORE_31_SDK_SHA512 \
/tmp/scripts/installDotNetCore.sh
${IMAGES_DIR}/build/installDotNetCore.sh
RUN set -ex \
rm -rf /tmp/NuGetScratch \
@ -98,8 +104,8 @@ RUN set -ex \
&& runtimesDir=$dotnetDir/runtimes \
&& mkdir -p $runtimesDir \
&& cd $runtimesDir \
&& . /tmp/scripts/__dotNetCoreSdkVersions.sh \
&& . /tmp/scripts/__dotNetCoreRunTimeVersions.sh \
&& . ${BUILD_DIR}/__dotNetCoreSdkVersions.sh \
&& . ${BUILD_DIR}/__dotNetCoreRunTimeVersions.sh \
&& mkdir $NET_CORE_APP_21 \
&& ln -s $NET_CORE_APP_21 2.1 \
&& ln -s 2.1 2 \
@ -115,6 +121,8 @@ RUN set -ex \
# Install Node.js, NPM, Yarn
FROM main AS node-install
ARG BUILD_DIR
ARG IMAGES_DIR
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y --no-install-recommends \
@ -126,22 +134,15 @@ RUN curl -fsSLO --compressed "https://github.com/gohugoio/hugo/releases/download
&& tar -xzf hugo_${HUGO_VERSION}_Linux-64bit.tar.gz -C /opt/hugo \
&& rm hugo_${HUGO_VERSION}_Linux-64bit.tar.gz
COPY build/__nodeVersions.sh /tmp/scripts
RUN chmod a+x /tmp/scripts/__nodeVersions.sh \
&& . /tmp/scripts/__nodeVersions.sh \
&& curl -sL https://git.io/n-install | bash -s -- -ny - \
&& ~/n/bin/n -d $NODE8_VERSION \
&& ~/n/bin/n -d $NODE10_VERSION \
&& ~/n/bin/n -d $NODE12_VERSION \
&& mv /usr/local/n/versions/node /opt/nodejs \
&& rm -rf /usr/local/n ~/n
COPY images/build/installNpm.sh /tmp/scripts
RUN chmod +x /tmp/scripts/installNpm.sh
RUN /tmp/scripts/installNpm.sh
COPY images/receiveGpgKeys.sh /tmp/scripts
RUN chmod +x /tmp/scripts/receiveGpgKeys.sh
RUN cd ${IMAGES_DIR} \
&& . ${BUILD_DIR}/__nodeVersions.sh \
&& ./installPlatform.sh nodejs $NODE8_VERSION \
&& ./installPlatform.sh nodejs $NODE10_VERSION \
&& ./installPlatform.sh nodejs $NODE12_VERSION
RUN ${IMAGES_DIR}/build/installNpm.sh
RUN set -ex \
&& . /tmp/scripts/__nodeVersions.sh \
&& /tmp/scripts/receiveGpgKeys.sh 6A010C5166006599AA17F08146C2130DFD2497F5 \
&& . ${BUILD_DIR}/__nodeVersions.sh \
&& ${IMAGES_DIR}/receiveGpgKeys.sh 6A010C5166006599AA17F08146C2130DFD2497F5 \
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
@ -151,7 +152,7 @@ RUN set -ex \
&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz
RUN set -ex \
&& . /tmp/scripts/__nodeVersions.sh \
&& . ${BUILD_DIR}/__nodeVersions.sh \
&& ln -s $NODE8_VERSION /opt/nodejs/8 \
&& ln -s $NODE10_VERSION /opt/nodejs/10 \
&& ln -s $NODE12_VERSION /opt/nodejs/12 \
@ -161,7 +162,7 @@ RUN set -ex \
&& ln -s 6.9 /opt/npm/6 \
&& ln -s 6 /opt/npm/latest
RUN set -ex \
&& . /tmp/scripts/__nodeVersions.sh \
&& . ${BUILD_DIR}/__nodeVersions.sh \
&& ln -s $YARN_VERSION /opt/yarn/stable \
&& ln -s $YARN_VERSION /opt/yarn/latest \
&& ln -s $YARN_VERSION /opt/yarn/$YARN_MINOR_VERSION \
@ -171,17 +172,9 @@ RUN set -ex \
&& cp -s /opt/nodejs/lts/bin/* /links \
&& cp -s /opt/yarn/stable/bin/yarn /opt/yarn/stable/bin/yarnpkg /links
###
# Python intermediate stages
# Docker doesn't support variables in `COPY --from`, so we're using intermediate stages
###
FROM mcr.microsoft.com/oryx/base:python-build-3.7-${PYTHON_BASE_TAG} AS py37-build-base
FROM mcr.microsoft.com/oryx/base:python-build-3.8-${PYTHON_BASE_TAG} AS py38-build-base
###
# End Python intermediate stages
###
FROM main AS python
ARG BUILD_DIR
ARG IMAGES_DIR
# It's not clear whether these are needed at runtime...
RUN apt-get update \
&& apt-get upgrade -y \
@ -191,14 +184,15 @@ RUN apt-get update \
&& rm -rf /var/lib/apt/lists/*
# https://github.com/docker-library/python/issues/147
ENV PYTHONIOENCODING UTF-8
COPY build/__pythonVersions.sh /tmp/scripts
COPY --from=py37-build-base /opt /opt
COPY --from=py38-build-base /opt /opt
RUN . /tmp/scripts/__pythonVersions.sh && set -ex \
RUN cd ${IMAGES_DIR} \
&& . ${BUILD_DIR}/__pythonVersions.sh \
&& ./installPlatform.sh python $PYTHON37_VERSION \
&& ./installPlatform.sh python $PYTHON38_VERSION
RUN . ${BUILD_DIR}/__pythonVersions.sh && set -ex \
&& [ -d "/opt/python/$PYTHON37_VERSION" ] && echo /opt/python/$PYTHON37_VERSION/lib >> /etc/ld.so.conf.d/python.conf \
&& [ -d "/opt/python/$PYTHON38_VERSION" ] && echo /opt/python/$PYTHON38_VERSION/lib >> /etc/ld.so.conf.d/python.conf \
&& ldconfig
RUN . /tmp/scripts/__pythonVersions.sh && set -ex \
RUN . ${BUILD_DIR}/__pythonVersions.sh && set -ex \
&& ln -s $PYTHON37_VERSION /opt/python/3.7 \
&& ln -s $PYTHON38_VERSION /opt/python/3.8 \
&& ln -s $PYTHON38_VERSION /opt/python/latest \
@ -207,6 +201,8 @@ RUN . /tmp/scripts/__pythonVersions.sh && set -ex \
# This stage is used only when building locally
FROM dotnet-install AS buildscriptbuilder
ARG BUILD_DIR
ARG IMAGES_DIR
COPY src/BuildScriptGenerator /usr/oryx/src/BuildScriptGenerator
COPY src/BuildScriptGeneratorCli /usr/oryx/src/BuildScriptGeneratorCli
COPY src/Common /usr/oryx/src/Common
@ -230,6 +226,8 @@ RUN if [ -z "$AGENTBUILD" ]; then \
RUN chmod a+x /opt/buildscriptgen/GenerateBuildScript
FROM python AS final
ARG BUILD_DIR
ARG IMAGES_DIR
WORKDIR /
ENV PATH="$PATH:/opt/oryx:/opt/nodejs/lts/bin:/opt/dotnet/sdks/lts:/opt/python/latest/bin:/opt/yarn/stable/bin:/opt/hugo"
@ -256,7 +254,7 @@ COPY --from=node-install /opt /opt
COPY --from=buildscriptbuilder /opt/buildscriptgen/ /opt/buildscriptgen/
RUN ln -s /opt/buildscriptgen/GenerateBuildScript /opt/oryx/oryx
RUN rm -rf /tmp/scripts
RUN rm -rf /tmp/oryx
# Bake Application Insights key from pipeline variable into final image
ARG AI_KEY

65
images/installPlatform.sh Normal file
Просмотреть файл

@ -0,0 +1,65 @@
#!/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/__common.sh
# https://medium.com/@Drew_Stokes/bash-argument-parsing-54f3b81a6a8f
PARAMS=""
while (( "$#" )); do
case "$1" in
-d|--dir)
targetDir=$2
shift 2
;;
-l|--links)
createLinks=$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"
PLATFORM_NAME="$1"
VERSION="$2"
fileName="$PLATFORM_NAME-$VERSION.tar.gz"
platformDir="/opt/$PLATFORM_NAME"
if [ -z "$targetDir" ]; then
targetDir="$platformDir/$VERSION"
fi
downloadFileAndVerifyChecksum $PLATFORM_NAME $VERSION $fileName
mkdir -p "$targetDir"
tar -xzf $fileName -C "$targetDir"
rm -f "$fileName"
if [ "$createLinks" != "false" ]; then
# Create a link : major.minor => major.minor.patch
cd "$platformDir"
IFS='.' read -ra VERSION_PARTS <<< "$VERSION"
MAJOR_MINOR="${VERSION_PARTS[0]}.${VERSION_PARTS[1]}"
echo
echo "Created link from $MAJOR_MINOR to $VERSION"
ln -s "$VERSION" "$MAJOR_MINOR"
fi

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

@ -1,4 +1,6 @@
FROM buildpack-deps:stretch-curl
ARG IMAGES_DIR=/tmp/oryx/images
ARG BUILD_DIR=/tmp/oryx/build
RUN apt-get update \
&& apt-get upgrade -y \
@ -6,5 +8,7 @@ RUN apt-get update \
xz-utils \
&& rm -rf /var/lib/apt/lists/*
COPY images/receiveGpgKeys.sh /tmp/scripts/receiveGpgKeys.sh
RUN chmod +x /tmp/scripts/receiveGpgKeys.sh
ADD images ${IMAGES_DIR}
ADD build ${BUILD_DIR}
RUN find ${IMAGES_DIR} -type f -iname "*.sh" -exec chmod +x {} \;
RUN find ${BUILD_DIR} -type f -iname "*.sh" -exec chmod +x {} \;

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

@ -1,4 +1,5 @@
FROM oryx-run-base
ARG IMAGES_DIR=/tmp/oryx/images
RUN apt-get update \
&& apt-get install -y \
@ -10,19 +11,8 @@ RUN apt-get update \
# from this image.
# Gpg keys listed at https://github.com/nodejs/node
RUN /tmp/scripts/receiveGpgKeys.sh \
9554F04D7259F04124DE6B476D5A82AC7E37093B \
94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \
0034A06D9D9B0064CE8ADF6BF1747F4AD2306D93 \
FD3A5288F042B6850C66B31F09FE44734EB7990E \
71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \
DD8F2338BAE7501E3DD5AC78C273792F7D83545D \
B9AE9905FFD7803F25714661B63B535A4C206CA9 \
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \
6A010C5166006599AA17F08146C2130DFD2497F5 \
4ED778F539E3634C779C87C6D7062848A1AB005C \
8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \
77984A986EBC2AA786BC0F66B01FBB92821C587A
RUN ${IMAGES_DIR}/receiveGpgKeys.sh \
6A010C5166006599AA17F08146C2130DFD2497F5
ENV YARN_VERSION 1.17.3
@ -34,5 +24,3 @@ RUN curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \
&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz
COPY images/runtime/node/installDependencies.sh /tmp/scripts/installDependencies.sh

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

@ -44,3 +44,5 @@ RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.blob.core.windows.net/
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet
RUN dotnet-sos install
RUN rm -rf /tmp/oryx

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

@ -44,3 +44,5 @@ RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.blob.core.windows.net/
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet
RUN dotnet-sos install
RUN rm -rf /tmp/oryx

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

@ -3,8 +3,6 @@ FROM oryx-node-run-base
RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
ENV NODE_VERSION 10.1.0
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
amd64) ARCH='x64';; \
@ -14,17 +12,16 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
armhf) ARCH='armv7l';; \
i386) ARCH='x86';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
esac
ENV NPM_CONFIG_LOGLEVEL info
ENV NODE_VERSION 10.1.0
RUN /tmp/scripts/installDependencies.sh
RUN rm -rf /tmp/scripts
ARG IMAGES_DIR=/tmp/oryx/images
RUN ${IMAGES_DIR}/installPlatform.sh nodejs $NODE_VERSION --dir /usr/local --links false \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
RUN ${IMAGES_DIR}/runtime/node/installDependencies.sh
RUN rm -rf /tmp/oryx
CMD [ "node" ]

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

@ -3,8 +3,6 @@ FROM oryx-node-run-base
RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
ENV NODE_VERSION 10.10.0
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
amd64) ARCH='x64';; \
@ -14,17 +12,16 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
armhf) ARCH='armv7l';; \
i386) ARCH='x86';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
esac
RUN /tmp/scripts/installDependencies.sh
RUN rm -rf /tmp/scripts
ENV NPM_CONFIG_LOGLEVEL info
ENV NODE_VERSION 10.10.0
ARG IMAGES_DIR=/tmp/oryx/images
RUN ${IMAGES_DIR}/installPlatform.sh nodejs $NODE_VERSION --dir /usr/local --links false \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
RUN ${IMAGES_DIR}/runtime/node/installDependencies.sh
RUN rm -rf /tmp/oryx
CMD [ "node" ]

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

@ -3,8 +3,6 @@ FROM oryx-node-run-base
RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
ENV NODE_VERSION 10.12.0
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
amd64) ARCH='x64';; \
@ -14,17 +12,16 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
armhf) ARCH='armv7l';; \
i386) ARCH='x86';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
esac
RUN /tmp/scripts/installDependencies.sh
RUN rm -rf /tmp/scripts
ENV NPM_CONFIG_LOGLEVEL info
ENV NODE_VERSION 10.12.0
ARG IMAGES_DIR=/tmp/oryx/images
RUN ${IMAGES_DIR}/installPlatform.sh nodejs $NODE_VERSION --dir /usr/local --links false \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
RUN ${IMAGES_DIR}/runtime/node/installDependencies.sh
RUN rm -rf /tmp/oryx
CMD [ "node" ]

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

@ -3,8 +3,6 @@ FROM oryx-node-run-base
RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
ENV NODE_VERSION 10.14.2
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
amd64) ARCH='x64';; \
@ -14,17 +12,16 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
armhf) ARCH='armv7l';; \
i386) ARCH='x86';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
esac
ENV NPM_CONFIG_LOGLEVEL info
ENV NODE_VERSION 10.14.2
RUN /tmp/scripts/installDependencies.sh
RUN rm -rf /tmp/scripts
ARG IMAGES_DIR=/tmp/oryx/images
RUN ${IMAGES_DIR}/installPlatform.sh nodejs $NODE_VERSION --dir /usr/local --links false \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
RUN ${IMAGES_DIR}/runtime/node/installDependencies.sh
RUN rm -rf /tmp/oryx
CMD [ "node" ]

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

@ -3,8 +3,6 @@ FROM oryx-node-run-base
RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
ENV NODE_VERSION 10.16.3
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
amd64) ARCH='x64';; \
@ -14,18 +12,16 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
armhf) ARCH='armv7l';; \
i386) ARCH='x86';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
# gpg keys listed at https://github.com/nodejs/node#release-keys
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
esac
RUN /tmp/scripts/installDependencies.sh
RUN rm -rf /tmp/scripts
ENV NPM_CONFIG_LOGLEVEL info
ENV NODE_VERSION 10.16.3
ARG IMAGES_DIR=/tmp/oryx/images
RUN ${IMAGES_DIR}/installPlatform.sh nodejs $NODE_VERSION --dir /usr/local --links false \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
RUN ${IMAGES_DIR}/runtime/node/installDependencies.sh
RUN rm -rf /tmp/oryx
CMD [ "node" ]

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

@ -3,8 +3,6 @@ FROM oryx-node-run-base
RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
ARG NODE10_VERSION
ENV NODE_VERSION ${NODE10_VERSION}
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
@ -15,17 +13,17 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
armhf) ARCH='armv7l';; \
i386) ARCH='x86';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
esac
ARG NODE10_VERSION
ENV NODE_VERSION ${NODE10_VERSION}
ENV NPM_CONFIG_LOGLEVEL info
RUN /tmp/scripts/installDependencies.sh
RUN rm -rf /tmp/scripts
ARG IMAGES_DIR=/tmp/oryx/images
RUN ${IMAGES_DIR}/installPlatform.sh nodejs $NODE_VERSION --dir /usr/local --links false \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
RUN ${IMAGES_DIR}/runtime/node/installDependencies.sh
RUN rm -rf /tmp/oryx
CMD [ "node" ]

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

@ -3,8 +3,6 @@ FROM oryx-node-run-base
RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
ENV NODE_VERSION 12.9.1
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
amd64) ARCH='x64';; \
@ -14,18 +12,16 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
armhf) ARCH='armv7l';; \
i386) ARCH='x86';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
# gpg keys listed at https://github.com/nodejs/node#release-keys
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
esac
RUN /tmp/scripts/installDependencies.sh
RUN rm -rf /tmp/scripts
ENV NODE_VERSION 12.9.1
ENV NPM_CONFIG_LOGLEVEL info
ARG IMAGES_DIR=/tmp/oryx/images
RUN ${IMAGES_DIR}/installPlatform.sh nodejs $NODE_VERSION --dir /usr/local --links false \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
RUN ${IMAGES_DIR}/runtime/node/installDependencies.sh
RUN rm -rf /tmp/oryx
CMD [ "node" ]

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

@ -3,9 +3,6 @@ FROM oryx-node-run-base
RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
ARG NODE12_VERSION
ENV NODE_VERSION ${NODE12_VERSION}
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
amd64) ARCH='x64';; \
@ -15,18 +12,17 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
armhf) ARCH='armv7l';; \
i386) ARCH='x86';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
# gpg keys listed at https://github.com/nodejs/node#release-keys
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
esac
RUN /tmp/scripts/installDependencies.sh
RUN rm -rf /tmp/scripts
ARG NODE12_VERSION
ENV NODE_VERSION ${NODE12_VERSION}
ENV NPM_CONFIG_LOGLEVEL info
ARG IMAGES_DIR=/tmp/oryx/images
RUN ${IMAGES_DIR}/installPlatform.sh nodejs $NODE_VERSION --dir /usr/local --links false \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
RUN ${IMAGES_DIR}/runtime/node/installDependencies.sh
RUN rm -rf /tmp/oryx
CMD [ "node" ]

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

@ -2,18 +2,12 @@
# to fetch the latest stretch release with the required fixes.
# https://github.com/nodejs/docker-node.git, commit ID 22668206915e4d39c4c35608848be835dd5526a3
FROM oryx-node-run-base
ENV NPM_CONFIG_LOGLEVEL info
ENV NODE_VERSION 4.4.7
RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.xz" \
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-x64.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-x64.tar.xz" -C /usr/local --strip-components=1 \
&& rm "node-v$NODE_VERSION-linux-x64.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt
RUN /tmp/scripts/installDependencies.sh
RUN rm -rf /tmp/scripts
ARG IMAGES_DIR=/tmp/oryx/images
RUN ${IMAGES_DIR}/installPlatform.sh nodejs $NODE_VERSION --dir /usr/local --links false
RUN ${IMAGES_DIR}/runtime/node/installDependencies.sh
RUN rm -rf /tmp/oryx
CMD [ "node" ]

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

@ -2,19 +2,13 @@
# to fetch the latest stretch release with the required fixes.
# https://github.com/nodejs/docker-node.git, commit ID 9cd8d4c47e9e695bb38d98a32c4dd45dfa981962
FROM oryx-node-run-base
ENV NPM_CONFIG_LOGLEVEL info
ENV NODE_VERSION 4.5.0
RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.xz" \
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-x64.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-x64.tar.xz" -C /usr/local --strip-components=1 \
&& rm "node-v$NODE_VERSION-linux-x64.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
RUN /tmp/scripts/installDependencies.sh
RUN rm -rf /tmp/scripts
ARG IMAGES_DIR=/tmp/oryx/images
RUN ${IMAGES_DIR}/installPlatform.sh nodejs $NODE_VERSION --dir /usr/local --links false \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
RUN ${IMAGES_DIR}/runtime/node/installDependencies.sh
RUN rm -rf /tmp/oryx
CMD [ "node" ]

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

@ -6,8 +6,6 @@ FROM oryx-node-run-base
RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
ENV NODE_VERSION 4.8.7
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
amd64) ARCH='x64';; \
@ -17,16 +15,13 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
armhf) ARCH='armv7l';; \
i386) ARCH='x86';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
&& curl -SLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
esac
RUN /tmp/scripts/installDependencies.sh
RUN rm -rf /tmp/scripts
ENV NODE_VERSION 4.8.7
ARG IMAGES_DIR=/tmp/oryx/images
RUN ${IMAGES_DIR}/installPlatform.sh nodejs $NODE_VERSION --dir /usr/local --links false \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
RUN ${IMAGES_DIR}/runtime/node/installDependencies.sh
RUN rm -rf /tmp/oryx
CMD [ "node" ]

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

@ -9,16 +9,11 @@ RUN groupadd --gid 1000 node \
ENV NPM_CONFIG_LOGLEVEL info
ENV NODE_VERSION 6.10.3
RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.xz" \
&& curl -SLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-x64.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-x64.tar.xz" -C /usr/local --strip-components=1 \
&& rm "node-v$NODE_VERSION-linux-x64.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
RUN /tmp/scripts/installDependencies.sh
RUN rm -rf /tmp/scripts
ARG IMAGES_DIR=/tmp/oryx/images
RUN ${IMAGES_DIR}/installPlatform.sh nodejs $NODE_VERSION --dir /usr/local --links false \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
RUN ${IMAGES_DIR}/runtime/node/installDependencies.sh
RUN rm -rf /tmp/oryx
CMD [ "node" ]

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

@ -6,8 +6,6 @@ FROM oryx-node-run-base
RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
ENV NODE_VERSION 6.11.5
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
amd64) ARCH='x64';; \
@ -17,17 +15,16 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
armhf) ARCH='armv7l';; \
i386) ARCH='x86';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
&& curl -SLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 \
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
esac
RUN /tmp/scripts/installDependencies.sh
RUN rm -rf /tmp/scripts
ENV NPM_CONFIG_LOGLEVEL info
ENV NODE_VERSION 6.11.5
ARG IMAGES_DIR=/tmp/oryx/images
RUN ${IMAGES_DIR}/installPlatform.sh nodejs $NODE_VERSION --dir /usr/local --links false \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
RUN ${IMAGES_DIR}/runtime/node/installDependencies.sh
RUN rm -rf /tmp/oryx
CMD [ "node" ]

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

@ -6,14 +6,10 @@ FROM oryx-node-run-base
ENV NPM_CONFIG_LOGLEVEL info
ENV NODE_VERSION 6.2.2
RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.xz" \
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-x64.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-x64.tar.xz" -C /usr/local --strip-components=1 \
&& rm "node-v$NODE_VERSION-linux-x64.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt
RUN /tmp/scripts/installDependencies.sh
RUN rm -rf /tmp/scripts
ARG IMAGES_DIR=/tmp/oryx/images
RUN ${IMAGES_DIR}/installPlatform.sh nodejs $NODE_VERSION --dir /usr/local --links false \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
RUN ${IMAGES_DIR}/runtime/node/installDependencies.sh
RUN rm -rf /tmp/oryx
CMD [ "node" ]

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

@ -6,15 +6,10 @@ FROM oryx-node-run-base
ENV NPM_CONFIG_LOGLEVEL info
ENV NODE_VERSION 6.6.0
RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.xz" \
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-x64.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-x64.tar.xz" -C /usr/local --strip-components=1 \
&& rm "node-v$NODE_VERSION-linux-x64.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
RUN /tmp/scripts/installDependencies.sh
RUN rm -rf /tmp/scripts
ARG IMAGES_DIR=/tmp/oryx/images
RUN ${IMAGES_DIR}/installPlatform.sh nodejs $NODE_VERSION --dir /usr/local --links false \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
RUN ${IMAGES_DIR}/runtime/node/installDependencies.sh
RUN rm -rf /tmp/oryx
CMD [ "node" ]

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

@ -9,16 +9,11 @@ RUN groupadd --gid 1000 node \
ENV NPM_CONFIG_LOGLEVEL info
ENV NODE_VERSION 6.9.5
RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.xz" \
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-x64.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-x64.tar.xz" -C /usr/local --strip-components=1 \
&& rm "node-v$NODE_VERSION-linux-x64.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
RUN /tmp/scripts/installDependencies.sh
RUN rm -rf /tmp/scripts
ARG IMAGES_DIR=/tmp/oryx/images
RUN ${IMAGES_DIR}/installPlatform.sh nodejs $NODE_VERSION --dir /usr/local --links false \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
RUN ${IMAGES_DIR}/runtime/node/installDependencies.sh
RUN rm -rf /tmp/oryx
CMD [ "node" ]

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

@ -3,9 +3,6 @@ FROM oryx-node-run-base
RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
ARG NODE6_VERSION
ENV NODE_VERSION ${NODE6_VERSION}
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
amd64) ARCH='x64';; \
@ -15,16 +12,16 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
armhf) ARCH='armv7l';; \
i386) ARCH='x86';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
esac
RUN /tmp/scripts/installDependencies.sh
RUN rm -rf /tmp/scripts
ARG NODE6_VERSION
ENV NPM_CONFIG_LOGLEVEL info
ENV NODE_VERSION ${NODE6_VERSION}
ARG IMAGES_DIR=/tmp/oryx/images
RUN ${IMAGES_DIR}/installPlatform.sh nodejs $NODE_VERSION --dir /usr/local --links false \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
RUN ${IMAGES_DIR}/runtime/node/installDependencies.sh
RUN rm -rf /tmp/oryx
CMD [ "node" ]

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

@ -9,13 +9,9 @@ RUN groupadd --gid 1000 node \
ENV NPM_CONFIG_LOGLEVEL info
ENV NODE_VERSION 8.0.0
RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.xz" \
&& curl -SLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-x64.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-x64.tar.xz" -C /usr/local --strip-components=1 \
&& rm "node-v$NODE_VERSION-linux-x64.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
ARG IMAGES_DIR=/tmp/oryx/images
RUN ${IMAGES_DIR}/installPlatform.sh nodejs $NODE_VERSION --dir /usr/local --links false \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
# This is a way to avoid using caches for the next stages, since we want the remaining steps
# to always run
@ -24,7 +20,7 @@ ARG CACHEBUST=0
# Update npm to 5.10.0 to avoid this error: https://github.com/npm/npm/issues/16766
RUN curl -L https://npmjs.org/install.sh | npm_install=5.10.0 sh
RUN /tmp/scripts/installDependencies.sh
RUN rm -rf /tmp/scripts
RUN ${IMAGES_DIR}/runtime/node/installDependencies.sh
RUN rm -rf /tmp/oryx
CMD [ "node" ]

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

@ -9,13 +9,9 @@ RUN groupadd --gid 1000 node \
ENV NPM_CONFIG_LOGLEVEL info
ENV NODE_VERSION 8.1.4
RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.xz" \
&& curl -SLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-x64.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-x64.tar.xz" -C /usr/local --strip-components=1 \
&& rm "node-v$NODE_VERSION-linux-x64.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
ARG IMAGES_DIR=/tmp/oryx/images
RUN ${IMAGES_DIR}/installPlatform.sh nodejs $NODE_VERSION --dir /usr/local --links false \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
# This is a way to avoid using caches for the next stages, since we want the remaining steps
# to always run
@ -24,8 +20,8 @@ ARG CACHEBUST=0
# Update npm to 5.10.0 to avoid this error: https://github.com/npm/npm/issues/16766
RUN curl -L https://npmjs.org/install.sh | npm_install=5.10.0 sh
RUN /tmp/scripts/installDependencies.sh
RUN rm -rf /tmp/scripts
RUN ${IMAGES_DIR}/runtime/node/installDependencies.sh
RUN rm -rf /tmp/oryx
CMD [ "node" ]

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

@ -3,8 +3,6 @@ FROM oryx-node-run-base
RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
ENV NODE_VERSION 8.11.4
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
amd64) ARCH='x64';; \
@ -14,17 +12,16 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
armhf) ARCH='armv7l';; \
i386) ARCH='x86';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
esac
RUN /tmp/scripts/installDependencies.sh
RUN rm -rf /tmp/scripts
ENV NPM_CONFIG_LOGLEVEL info
ENV NODE_VERSION 8.11.4
ARG IMAGES_DIR=/tmp/oryx/images
RUN ${IMAGES_DIR}/installPlatform.sh nodejs $NODE_VERSION --dir /usr/local --links false \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
RUN ${IMAGES_DIR}/runtime/node/installDependencies.sh
RUN rm -rf /tmp/oryx
CMD [ "node" ]

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

@ -3,8 +3,6 @@ FROM oryx-node-run-base
RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
ENV NODE_VERSION 8.12.0
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
amd64) ARCH='x64';; \
@ -14,17 +12,16 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
armhf) ARCH='armv7l';; \
i386) ARCH='x86';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
esac
RUN /tmp/scripts/installDependencies.sh
RUN rm -rf /tmp/scripts
ENV NPM_CONFIG_LOGLEVEL info
ENV NODE_VERSION 8.12.0
ARG IMAGES_DIR=/tmp/oryx/images
RUN ${IMAGES_DIR}/installPlatform.sh nodejs $NODE_VERSION --dir /usr/local --links false \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
RUN ${IMAGES_DIR}/runtime/node/installDependencies.sh
RUN rm -rf /tmp/oryx
CMD [ "node" ]

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

@ -6,26 +6,22 @@ FROM oryx-node-run-base
RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
ENV NPM_CONFIG_LOGLEVEL info
ENV NODE_VERSION 8.2.1
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
amd64) ARCH='x64';; \
ppc64el) ARCH='ppc64le';; \
s390x) ARCH='s390x';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
&& curl -SLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 \
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
esac
RUN /tmp/scripts/installDependencies.sh
RUN rm -rf /tmp/scripts
ENV NPM_CONFIG_LOGLEVEL info
ENV NODE_VERSION 8.2.1
ARG IMAGES_DIR=/tmp/oryx/images
RUN ${IMAGES_DIR}/installPlatform.sh nodejs $NODE_VERSION --dir /usr/local --links false \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
RUN ${IMAGES_DIR}/runtime/node/installDependencies.sh
RUN rm -rf /tmp/oryx
CMD [ "node" ]

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

@ -6,8 +6,6 @@ FROM oryx-node-run-base
RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
ENV NODE_VERSION 8.8.1
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
amd64) ARCH='x64';; \
@ -16,17 +14,16 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
arm64) ARCH='arm64';; \
armhf) ARCH='armv7l';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
&& curl -SLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 \
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
esac
RUN /tmp/scripts/installDependencies.sh
RUN rm -rf /tmp/scripts
ENV NPM_CONFIG_LOGLEVEL info
ENV NODE_VERSION 8.8.1
ARG IMAGES_DIR=/tmp/oryx/images
RUN ${IMAGES_DIR}/installPlatform.sh nodejs $NODE_VERSION --dir /usr/local --links false \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
RUN ${IMAGES_DIR}/runtime/node/installDependencies.sh
RUN rm -rf /tmp/oryx
CMD [ "node" ]

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

@ -6,8 +6,6 @@ FROM oryx-node-run-base
RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
ENV NODE_VERSION 8.9.4
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
amd64) ARCH='x64';; \
@ -17,17 +15,16 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
armhf) ARCH='armv7l';; \
i386) ARCH='x86';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
&& curl -SLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
esac
RUN /tmp/scripts/installDependencies.sh
RUN rm -rf /tmp/scripts
ENV NPM_CONFIG_LOGLEVEL info
ENV NODE_VERSION 8.9.4
ARG IMAGES_DIR=/tmp/oryx/images
RUN ${IMAGES_DIR}/installPlatform.sh nodejs $NODE_VERSION --dir /usr/local --links false \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
RUN ${IMAGES_DIR}/runtime/node/installDependencies.sh
RUN rm -rf /tmp/oryx
CMD [ "node" ]

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

@ -3,9 +3,6 @@ FROM oryx-node-run-base
RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
ARG NODE8_VERSION
ENV NODE_VERSION ${NODE8_VERSION}
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
amd64) ARCH='x64';; \
@ -15,18 +12,17 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
armhf) ARCH='armv7l';; \
i386) ARCH='x86';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
# gpg keys listed at https://github.com/nodejs/node#release-keys
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
esac
RUN /tmp/scripts/installDependencies.sh
RUN rm -rf /tmp/scripts
ARG NODE8_VERSION
ENV NODE_VERSION ${NODE8_VERSION}
ENV NPM_CONFIG_LOGLEVEL info
ARG IMAGES_DIR=/tmp/oryx/images
RUN ${IMAGES_DIR}/installPlatform.sh nodejs $NODE_VERSION --dir /usr/local --links false \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
RUN ${IMAGES_DIR}/runtime/node/installDependencies.sh
RUN rm -rf /tmp/oryx
CMD [ "node" ]

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

@ -3,8 +3,6 @@ FROM oryx-node-run-base
RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
ENV NODE_VERSION 9.4.0
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
amd64) ARCH='x64';; \
@ -14,17 +12,16 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
armhf) ARCH='armv7l';; \
i386) ARCH='x86';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
&& curl -SLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
esac
RUN /tmp/scripts/installDependencies.sh
RUN rm -rf /tmp/scripts
ENV NPM_CONFIG_LOGLEVEL info
ENV NODE_VERSION 9.4.0
ARG IMAGES_DIR=/tmp/oryx/images
RUN ${IMAGES_DIR}/installPlatform.sh nodejs $NODE_VERSION --dir /usr/local --links false \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
RUN ${IMAGES_DIR}/runtime/node/installDependencies.sh
RUN rm -rf /tmp/oryx
CMD [ "node" ]

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

@ -1,5 +1,6 @@
# From https://github.com/docker-library/php.git
FROM php-fpm-run-base
ARG IMAGES_DIR=/tmp/oryx/images
# do NOT merge this content with above line because the
# above line is shared across all php images
@ -68,9 +69,7 @@ RUN set -eux; \
if [ -n "$PHP_ASC_URL" ]; then \
curl -fsSL -o php.tar.xz.asc "$PHP_ASC_URL"; \
export GNUPGHOME="$(mktemp -d)"; \
for key in $GPG_KEYS; do \
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \
done; \
${IMAGES_DIR}/receiveGpgKeys.sh $GPG_KEYS; \
gpg --batch --verify php.tar.xz.asc php.tar.xz; \
gpgconf --kill all; \
rm -rf "$GNUPGHOME"; \

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

@ -1,5 +1,6 @@
# From https://github.com/docker-library/php.git
FROM php-fpm-run-base
ARG IMAGES_DIR=/tmp/oryx/images
# do NOT merge this content with above line because the
# above line is shared across all php images
@ -68,9 +69,7 @@ RUN set -eux; \
if [ -n "$PHP_ASC_URL" ]; then \
curl -fsSL -o php.tar.xz.asc "$PHP_ASC_URL"; \
export GNUPGHOME="$(mktemp -d)"; \
for key in $GPG_KEYS; do \
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \
done; \
${IMAGES_DIR}/receiveGpgKeys.sh $GPG_KEYS; \
gpg --batch --verify php.tar.xz.asc php.tar.xz; \
gpgconf --kill all; \
rm -rf "$GNUPGHOME"; \

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

@ -1,5 +1,6 @@
# Commit b4319e8f767f1200c9013e08baf2c34b9c84e301 from repo https://github.com/docker-library/php.git
FROM php-run-base
ARG IMAGES_DIR=/tmp/oryx/images
RUN apt-get update \
&& apt-get install -y \
@ -118,7 +119,7 @@ RUN set -xe; \
if [ -n "$PHP_ASC_URL" ]; then \
wget -O php.tar.xz.asc "$PHP_ASC_URL"; \
export GNUPGHOME="$(mktemp -d)"; \
/tmp/scripts/receiveGpgKeys.sh $GPG_KEYS; \
${IMAGES_DIR}/receiveGpgKeys.sh $GPG_KEYS; \
gpg --batch --verify php.tar.xz.asc php.tar.xz; \
command -v gpgconf > /dev/null && gpgconf --kill all; \
rm -rf "$GNUPGHOME"; \

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

@ -1,5 +1,6 @@
# From https://github.com/docker-library/php.git
FROM php-run-base
ARG IMAGES_DIR=/tmp/oryx/images
# do NOT merge this content with above line because the
# above line is shared across all php images
@ -127,7 +128,7 @@ RUN set -eux; \
if [ -n "$PHP_ASC_URL" ]; then \
curl -fsSL -o php.tar.xz.asc "$PHP_ASC_URL"; \
export GNUPGHOME="$(mktemp -d)"; \
/tmp/scripts/receiveGpgKeys.sh $GPG_KEYS; \
${IMAGES_DIR}/receiveGpgKeys.sh $GPG_KEYS; \
gpg --batch --verify php.tar.xz.asc php.tar.xz; \
gpgconf --kill all; \
rm -rf "$GNUPGHOME"; \

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

@ -1,5 +1,6 @@
# From https://github.com/docker-library/php.git
FROM php-run-base
ARG IMAGES_DIR=/tmp/oryx/images
# do NOT merge this content with above line because the
# above line is shared across all php images
@ -127,7 +128,7 @@ RUN set -eux; \
if [ -n "$PHP_ASC_URL" ]; then \
curl -fsSL -o php.tar.xz.asc "$PHP_ASC_URL"; \
export GNUPGHOME="$(mktemp -d)"; \
/tmp/scripts/receiveGpgKeys.sh $GPG_KEYS; \
${IMAGES_DIR}/receiveGpgKeys.sh $GPG_KEYS; \
gpg --batch --verify php.tar.xz.asc php.tar.xz; \
gpgconf --kill all; \
rm -rf "$GNUPGHOME"; \

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

@ -19,3 +19,4 @@ ENV ORYX_AI_INSTRUMENTATION_KEY=${AI_KEY}
COPY --from=startupCmdGen /opt/startupcmdgen/startupcmdgen /opt/startupcmdgen/startupcmdgen
RUN ln -s /opt/startupcmdgen/startupcmdgen /usr/local/bin/oryx
RUN rm -rf /tmp/oryx

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

@ -97,3 +97,5 @@ RUN set -x \
&& chmod +x ./configure \
&& ./configure --with-unixODBC=shared,/usr \
&& docker-php-ext-install odbc
RUN rm -rf /tmp/oryx

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

@ -12,11 +12,10 @@ ENV BUILD_NUMBER=${BUILD_NUMBER}
RUN ./build.sh python /opt/startupcmdgen/startupcmdgen
FROM oryx-run-base AS main
ARG IMAGES_DIR=/tmp/oryx/images
ENV PYTHON_VERSION %PYTHON_FULL_VERSION%
# Add python binaries from Oryx base image
COPY --from=mcr.microsoft.com/oryx/base:python-build-%PYTHON_VERSION%-%IMAGE_TAG% /opt /opt
RUN ${IMAGES_DIR}/installPlatform.sh python $PYTHON_VERSION --dir /opt/python/$PYTHON_VERSION --links false
RUN set -ex \
&& cd /opt/python/ \
&& ln -s %PYTHON_FULL_VERSION% %PYTHON_VERSION% \
@ -33,7 +32,6 @@ ENV PATH="/opt/python/%PYTHON_MAJOR_VERSION%/bin:${PATH}"
# Bake Application Insights key from pipeline variable into final image
ARG AI_KEY
ENV ORYX_AI_INSTRUMENTATION_KEY=${AI_KEY}
COPY images/runtime/python/install-dependencies.sh /tmp/scripts/install-dependencies.sh
RUN /tmp/scripts/install-dependencies.sh
RUN rm -rf /tmp/scripts
RUN ${IMAGES_DIR}/runtime/python/install-dependencies.sh
RUN rm -rf /tmp/oryx
COPY --from=startupCmdGen /opt/startupcmdgen/startupcmdgen /opt/startupcmdgen/startupcmdgen

66
platforms/__common.sh Normal file
Просмотреть файл

@ -0,0 +1,66 @@
#!/bin/bash
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
# --------------------------------------------------------------------------------------------
# Since this file is expected to be 'sourced', we expect the REPO_DIR variable
# to be supplied in the parent script sourcing this file.
source "$REPO_DIR/build/__variables.sh"
volumeHostDir="$ARTIFACTS_DIR/platformSdks"
volumeContainerDir="/tmp/sdk"
imageName="oryx/platformsdk"
blobExists() {
local containerName="$1"
local blobName="$2"
local exitCode=1
curl -I https://oryxsdksdev.blob.core.windows.net/$containerName/$blobName 2> /tmp/curlError.txt 1> /tmp/curlOut.txt
grep "HTTP/1.1 200 OK" /tmp/curlOut.txt &> /dev/null
exitCode=$?
rm -f /tmp/curlOut.txt
rm -f /tmp/curlError.txt
if [ $exitCode -eq 0 ]; then
return 0
else
return 1
fi
}
getSdkFromImage() {
local imageName="$1"
local hostVolumeDir="$2"
mkdir -p "$hostVolumeDir"
echo "Copying sdk file to host directory..."
echo
docker run \
--rm \
-v $hostVolumeDir:$volumeContainerDir \
$imageName \
bash -c "cp -f /tmp/compressedSdk/* /tmp/sdk"
}
buildPlatform() {
local versionFile="$1"
local funcToCall="$2"
while IFS= read -r VERSION_INFO || [[ -n $VERSION_INFO ]]
do
# Ignore whitespace and comments
if [ -z "$VERSION_INFO" ] || [[ $VERSION_INFO = \#* ]] ; then
continue
fi
IFS=',' read -ra VERSION_INFO <<< "$VERSION_INFO"
versionArgs=()
for arg in "${VERSION_INFO[@]}"
do
# Trim beginning whitespace
arg="$(echo -e "${arg}" | sed -e 's/^[[:space:]]*//')"
versionArgs+=("$arg")
done
$funcToCall "${versionArgs[@]}"
done < "$versionFile"
}

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

@ -0,0 +1,57 @@
#!/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
dotNetPlatformDir="$REPO_DIR/platforms/dotnet"
getDotNetCoreSdk() {
local sdkVersion="$1"
local sha="$2"
local downloadUrl="$3"
local targetDir="$volumeHostDir/dotnet"
mkdir -p "$targetDir"
if blobExists dotnet dotnet-$sdkVersion.tar.gz; then
echo ".NET Core version '$sdkVersion' already present in blob storage. Skipping it..."
echo
else
echo "Downloading .NET Core SDK version '$sdkVersion'..."
echo
if [ -z "$downloadUrl" ]; then
# Use default download url file
downloadUrl="https://dotnetcli.blob.core.windows.net/dotnet/Sdk/$sdkVersion/dotnet-sdk-$sdkVersion-linux-x64.tar.gz"
fi
# Follow the format used by all platforms
downloadedFile="dotnet-$sdkVersion.tar.gz"
tempDir="/tmp/oryx-dotnetInstall"
mkdir -p $tempDir
cd $tempDir
rm -f "$downloadedFile"
curl -SL $downloadUrl --output "$downloadedFile"
echo "Verifying archive hash..."
echo "$sha $downloadedFile" | sha512sum -c -
# Find the runtime version
tar -xzf $downloadedFile -C .
runtimeVersionDir=$(find "$tempDir/shared/Microsoft.NETCore.App" -mindepth 1 -maxdepth 1 -type d)
runtimeVersion=$(basename $runtimeVersionDir)
cp -f "$downloadedFile" "$targetDir"
rm -rf $tempDir
fi
echo "$runtimeVersion, $sdkVersion" >> "$targetDir/available_versions.txt"
}
echo
echo "Getting .NET Core Sdks..."
echo
buildPlatform "$dotNetPlatformDir/versionsToBuild.txt" getDotNetCoreSdk

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

@ -0,0 +1,15 @@
# version, sha, download url
1.1.14, E36AA4B278B936E1E2989B5E556F4EC3AEF2CB1EBB5ABD1BD6011D511873FC3E72101D035CF4DAF1563C7A3C43C193863D38CBF24288D375DD143AB42AFAE524, https://dotnetcli.blob.core.windows.net/dotnet/Sdk/1.1.14/dotnet-dev-debian.9-x64.1.1.14.tar.gz
2.1.801, 5781C6E254270803D9BB2C29B1555FB9DB258BF99BA2EFA2B457CA28226C70D6305C9B7C141CBF49ADE4915E136FAE941727ADFC60373E4822C52BF0E92C451B,
2.1.802, 8601EC68FA8978C5A08A696CC69F5E0AA9DABF274BADE40E2FD9DED2E563F2CC7A1CB418A95C9B52E1FA9B6C4A30993BE68CB3B6BBDA4598C57B37EC9CE992AD,
2.1.803, 57d48d6ca1bd92ac348dc05220d984811c0cf005774d7afdfbbf125a842acb0a26572146ed25a7eb26f4e0404fe840b70d1e7ec1fb7c9a5c6cfe81fefc41b363,
2.2.401, 08E1FCAFA4F898C80FF5E88EEB40C7497B4F5651AF3B8EC85F65A3DAA2F1509A766D833477358D3FF83D179E014034AB0C48120847EF24736C8D1A5B67FEC10B,
2.2.402, 81937DE0874EE837E3B42E36D1CF9E04BD9DEFF6BA60D0162AE7CA9336A78F733E624136D27F559728DF3F681A72A669869BF91D02DB47C5331398C0CFDA9B44,
3.0.100-preview8-013656, 448C740418F0AB43B3A8D9F7CCB532E71E590692D3B64239C3F21D46DF3A46788B5B824E1A10236E5ABE51D4A5143C27B90D08B342A683C96BD9ABEBC2D33017,
3.0.100-preview9-014004, B4E4580250F172C7B14CBCE96D2DE54D13A0B312ED71F86986CC53A9392491347E83CDEFC2805A23BD652FC2CC0658C2E74FC8C05212C3983C19E2ADBC1FE9A3,
3.0.100-rc1-014190, 24CFE258849579399B93AC81813BDDDADD1D1C546E3EB5DAE7586263F157A4B3DE3223E6A54B5458ECD103E4C70499CAECC330B57570302E378A2203EADDE671,
3.0.100, 766da31f9a0bcfbf0f12c91ea68354eb509ac2111879d55b656f19299c6ea1c005d31460dac7c2a4ef82b3edfea30232c82ba301fb52c0ff268d3e3a1b73d8f7,
3.0.101, 8cd6070c9df1272ac3f2a0e9bd8c1fc2cfef38907fa2e3c81384f005168f45036b5904b4f731cbe37d2b3fe558f560008c481939093b0d08ef0f1778ca97f186,
3.0.102, 77bc287d9c20630976ac4c0736192ba4899154c9e7cc5b87bc9d94d5d8abafdd832cfe8f385b6ba584c702d9261566109df15ab46b0d62bd218d950d3b47893e,
3.1.100, 5217ae1441089a71103694be8dd5bb3437680f00e263ad28317665d819a92338a27466e7d7a2b1f6b74367dd314128db345fa8fff6e90d0c966dea7a9a43bd21,
3.1.101, eeee75323be762c329176d5856ec2ecfd16f06607965614df006730ed648a5b5d12ac7fd1942fe37cfc97e3013e796ef278e7c7bc4f32b8680585c4884a8a6a1,

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

@ -0,0 +1,9 @@
FROM buildpack-deps:stretch
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
jq \
&& rm -rf /var/lib/apt/lists/*
RUN curl -sL https://git.io/n-install | bash -s -- -ny -
RUN mkdir -p /tmp/scripts
COPY platforms/node/build.sh /tmp/scripts
RUN chmod +x /tmp/scripts/build.sh

37
platforms/node/build.sh Executable file
Просмотреть файл

@ -0,0 +1,37 @@
#!/bin/bash
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
# --------------------------------------------------------------------------------------------
set -ex
version="$1"
# Certain versions (ex: 6.4.1) of NPM have issues installing native modules
# like 'grpc', so upgrading them to a version whch we know works.
upgradeNpm() {
local node_ver="$1"
local nodeDir="/usr/local/n/versions/node/$node_ver"
local nodeModulesDir="$nodeDir/lib/node_modules"
local npm_ver=`jq -r .version $nodeModulesDir/npm/package.json`
IFS='.' read -ra versionParts <<< "$npm_ver"
local majorPart="${versionParts[0]}"
local minorPart="${versionParts[1]}"
if [ "$majorPart" -eq "6" ] && [ "$minorPart" -lt "9" ] ; then
echo "Upgrading node $node_ver's npm version from $npm_ver to 6.9.0"
cd $nodeModulesDir
PATH="$nodeDir/bin:$PATH" \
"$nodeModulesDir/npm/bin/npm-cli.js" install npm@6.9.0
echo
fi
}
~/n/bin/n -d $version
upgradeNpm $version
cd /usr/local/n/versions/node/$version
mkdir -p /tmp/compressedSdk
tar -zcf /tmp/compressedSdk/nodejs-$version.tar.gz .
rm -rf /usr/local/n ~/n

47
platforms/node/getNode.sh Executable file
Просмотреть файл

@ -0,0 +1,47 @@
#!/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
nodePlatformDir="$REPO_DIR/platforms/node"
builtNodeImage=false
getNode() {
local version="$1"
local hostNodeArtifactsDir="$volumeHostDir/nodejs"
mkdir -p "$hostNodeArtifactsDir"
if blobExists nodejs nodejs-$version.tar.gz; then
echo "Node version '$version' already present in blob storage. Skipping it..."
echo
else
echo "Node version '$version' not present in blob storage. Getting it..."
echo
if ! $builtNodeImage; then
docker build \
-f "$nodePlatformDir/Dockerfile" \
-t $imageName \
$REPO_DIR
builtNodeImage=true
fi
docker run \
-v $hostNodeArtifactsDir:$volumeContainerDir \
$imageName \
bash -c "/tmp/scripts/build.sh $version && cp -f /tmp/compressedSdk/* /tmp/sdk"
fi
echo "$version" >> "$hostNodeArtifactsDir/available_versions.txt"
}
echo "Getting Node Sdk..."
echo
buildPlatform "$nodePlatformDir/versionsToBuild.txt" getNode

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

@ -0,0 +1,41 @@
4.4.7
4.5.0
4.8.0
4.8.7
6.2.2
6.6.0
6.9.3
6.9.5
6.10.3
6.11.0
6.11.5
8.0.0
8.1.4
8.2.1
8.8.1
8.9.4
8.11.2
8.11.4
8.12.0
8.15.1
8.16.1
9.4.0
10.1.0
10.10.0
10.12.0
10.14.2
10.16.3
10.18.0
12.9.1
12.11.0
12.11.1
12.12.0
12.13.0
12.14.0
# LTS versions
6.17.1
8.17.0
10.18.1
12.14.1

8
platforms/php/Dockerfile Normal file
Просмотреть файл

@ -0,0 +1,8 @@
FROM php-build-prereqs AS php73-build
ARG PHP_VERSION
ARG GPG_KEYS
ARG PHP_SHA256
RUN PHP_VERSION=$PHP_VERSION \
GPG_KEYS=$GPG_KEYS \
PHP_SHA256=$PHP_SHA256 \
/php/build.sh

102
platforms/php/buildPhp.sh Executable file
Просмотреть файл

@ -0,0 +1,102 @@
#!/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/__phpVersions.sh
phpPlatformDir="$REPO_DIR/platforms/php"
builtPhpPrereqs=false
buildPhpPrereqsImage() {
if ! $builtPhpPrereqs; then
echo "Building Php pre-requisites image..."
echo
docker build -f "$phpPlatformDir/prereqs/Dockerfile" -t "php-build-prereqs" $REPO_DIR
builtPhpPrereqs=true
fi
}
buildPhp() {
local version="$1"
local sha="$2"
local gpgKeys="$3"
local imageName="oryx/php-sdk"
local targetDir="$volumeHostDir/php"
mkdir -p "$targetDir"
if blobExists php php-$version.tar.gz; then
echo "Php version '$version' already present in blob storage. Skipping building it..."
echo
else
if ! $builtPhpPrereqs; then
buildPhpPrereqsImage
fi
echo "Php version '$version' not present in blob storage. Building it in a docker image..."
echo
docker build \
-f "$phpPlatformDir/Dockerfile" \
--build-arg PHP_VERSION=$version \
--build-arg PHP_SHA256=$sha \
--build-arg GPG_KEYS="$gpgKeys" \
-t $imageName \
$REPO_DIR
getSdkFromImage $imageName "$targetDir"
fi
echo "$version" >> "$targetDir/available_versions.txt"
}
buildPhpComposer() {
local version="$1"
local sha="$2"
local imageName="oryx/php-composer-sdk"
local targetDir="$volumeHostDir/php-composer"
mkdir -p "$targetDir"
if blobExists php-composer php-composer-$version.tar.gz; then
echo "Php composer version '$version' already present in blob storage. Skipping building it..."
echo
else
if ! $builtPhpPrereqs; then
buildPhpPrereqsImage
fi
echo "Php composer version '$version' not present in blob storage. Building it in a docker image..."
echo
# Installing PHP composer requires having PHP installed in an first image first, so we try installing
# a version here.
docker build \
-f "$phpPlatformDir/composer/Dockerfile" \
--build-arg PHP_VERSION="$PHP73_VERSION" \
--build-arg PHP_SHA256="$PHP73_TAR_SHA256" \
--build-arg GPG_KEYS="$PHP73_KEYS" \
--build-arg COMPOSER_VERSION="$version" \
--build-arg COMPOSER_SHA384="$sha" \
-t $imageName \
$REPO_DIR
getSdkFromImage $imageName "$targetDir"
fi
echo "$version" >> "$targetDir/available_versions.txt"
}
echo "Building Php..."
echo
buildPlatform "$phpPlatformDir/versionsToBuild.txt" buildPhp
echo
echo "Building Php composer..."
echo
buildPlatform "$phpPlatformDir/composer/versionsToBuild.txt" buildPhpComposer

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

@ -0,0 +1,22 @@
FROM php-build-prereqs
ARG PHP_VERSION
ARG GPG_KEYS
ARG PHP_SHA256
ARG COMPOSER_VERSION
ARG COMPOSER_SHA384
RUN PHP_VERSION=$PHP_VERSION \
GPG_KEYS=$GPG_KEYS \
PHP_SHA256=$PHP_SHA256 \
/php/build.sh
RUN set -eux \
&& composerDir="/opt/php-composer" \
&& mkdir -p "$composerDir" \
&& export phpbin="/opt/php/$PHP_VERSION/bin/php" \
&& $phpbin -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
&& $phpbin -r "if (hash_file('sha384', 'composer-setup.php') === '$COMPOSER_SHA384') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
&& $phpbin composer-setup.php --version=$COMPOSER_VERSION --install-dir="$composerDir" \
&& $phpbin -r "unlink('composer-setup.php');" \
&& compressedSdkDir="/tmp/compressedSdk" \
&& cd "$composerDir" \
&& tar -zcf "$compressedSdkDir/php-composer-$COMPOSER_VERSION.tar.gz" .

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

@ -0,0 +1,2 @@
# version, sha384
1.9.2, c5b9b6d368201a9db6f74e2611495f369991b72d9c8cbd3ffbc63edff210eb73d46ffbfce88669ad33695ef77dc76976

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

@ -0,0 +1,7 @@
FROM buildpack-deps:stretch AS php-build-prereqs
COPY platforms/php/prereqs /php
COPY build/__phpVersions.sh /php/
COPY platforms/python/prereqs/build.sh /tmp/
COPY images/receiveGpgKeys.sh /tmp/receiveGpgKeys.sh
RUN chmod +x /tmp/*.sh
RUN chmod +x /php/*.sh && . /php/installPrereqs.sh

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

@ -0,0 +1 @@
Scripts in this directory were adapted from https://github.com/docker-library/php/tree/master/7.3/stretch/apache

154
platforms/php/prereqs/build.sh Executable file
Просмотреть файл

@ -0,0 +1,154 @@
#!/bin/bash
set -eux
PHP_MAJOR=${PHP_VERSION:0:1}
PHP_MINOR=${PHP_VERSION:2:1}
INSTALLATION_BASE_DIR="/opt/php/"
INSTALLATION_PREFIX="$INSTALLATION_BASE_DIR$PHP_VERSION"
PHP_INI_DIR="$INSTALLATION_PREFIX/ini"
PHP_SRC_DIR="/usr/src/php"
mkdir -p "$PHP_INI_DIR/conf.d";
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
# Enable optimization (-O2)
# Enable linker optimization (this sorts the hash buckets to improve cache locality, and is non-default)
# Adds GNU HASH segments to generated executables (this is used if present, and is much faster than sysv hash; in this configuration, sysv hash is also generated)
# https://github.com/docker-library/php/issues/272
PHP_CFLAGS="-fstack-protector-strong -fpic -fpie -O2"
PHP_CPPFLAGS="$PHP_CFLAGS"
PHP_LDFLAGS="-Wl,-O1 -Wl,--hash-style=both -pie"
PHP_URL="https://secure.php.net/get/php-$PHP_VERSION.tar.xz/from/this/mirror"
PHP_ASC_URL="" # "https://secure.php.net/get/php-$PHP_VERSION.tar.xz.asc/from/this/mirror"
GPG_KEYS=($GPG_KEYS) # Cast the string to an array
PHP_MD5=""
fetchDeps='wget';
if ! command -v gpg > /dev/null; then
fetchDeps="$fetchDeps dirmngr gnupg"
fi
apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends $fetchDeps
rm -rf /var/lib/apt/lists/*
mkdir -p /usr/src
cd /usr/src
wget -O php.tar.xz "$PHP_URL"
if [ -n "$PHP_SHA256" ]; then
echo "$PHP_SHA256 *php.tar.xz" | sha256sum -c -;
fi;
if [ -n "$PHP_MD5" ]; then
echo "$PHP_MD5 *php.tar.xz" | md5sum -c -;
fi;
if [ -n "$PHP_ASC_URL" ]; then
wget -O php.tar.xz.asc "$PHP_ASC_URL";
export GNUPGHOME="$(mktemp -d)";
/tmp/receiveGpgKeys.sh ${GPG_KEYS[0]} ${GPG_KEYS[1]}
gpg --batch --verify php.tar.xz.asc php.tar.xz;
command -v gpgconf > /dev/null && gpgconf --kill all;
rm -rf "$GNUPGHOME";
fi;
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps
versionDevReqs='libssl-dev'
if [ $PHP_MAJOR == '5' ]; then
versionDevReqs='libssl1.0-dev'
fi
savedAptMark="$(apt-mark showmanual)";
apt-get update;
apt-get upgrade -y;
apt-get install -y --no-install-recommends \
libcurl4-openssl-dev \
libedit-dev \
libsqlite3-dev \
libxml2-dev \
zlib1g-dev \
$versionDevReqs;
rm -rf /var/lib/apt/lists/*;
export \
CFLAGS="$PHP_CFLAGS" \
CPPFLAGS="$PHP_CPPFLAGS" \
LDFLAGS="$PHP_LDFLAGS"
/php/docker-php-source.sh extract;
cd $PHP_SRC_DIR;
gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)";
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)";
# https://bugs.php.net/bug.php?id=74125
if [ ! -d /usr/include/curl ]; then
ln -sT "/usr/include/$debMultiarch/curl" /usr/local/include/curl;
fi;
versionConfigureArgs=''
if [ $PHP_MAJOR == '7' ] && [ $PHP_MINOR != '0' ]; then
versionConfigureArgs='--with-password-argon2 --with-sodium=shared'
fi
./configure \
--build="$gnuArch" \
--prefix="$INSTALLATION_PREFIX" \
--with-config-file-path="$PHP_INI_DIR" \
--with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \
--enable-option-checking=fatal \
--with-mhash \
--enable-ftp \
--enable-mbstring \
--enable-mysqlnd \
--enable-bcmath \
$versionConfigureArgs \
--with-curl \
--with-libedit \
--with-openssl \
--with-zlib \
$(test "$gnuArch" = 's390x-linux-gnu' && echo '--without-pcre-jit') \
--with-libdir="lib/$debMultiarch";
make -j "$(nproc)";
find -type f -name '*.a' -delete;
make install;
find $INSTALLATION_PREFIX -type f -executable -exec strip --strip-all '{}' + || true;
make clean;
# https://github.com/docker-library/php/issues/692 (copy default example "php.ini" files somewhere easily discoverable)
cp -v php.ini-* "$PHP_INI_DIR/";
cp "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
cd /;
/php/docker-php-source.sh delete;
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
apt-mark auto '.*' > /dev/null;
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark;
find $INSTALLATION_PREFIX -type f -executable -exec ldd '{}' ';' \
| awk '/=>/ { print $(NF-1) }' \
| sort -u \
| xargs -r dpkg-query --search \
| cut -d: -f1 \
| sort -u \
| xargs -r apt-mark manual \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false;
$INSTALLATION_PREFIX/bin/php --version;
# https://github.com/docker-library/php/issues/443
$INSTALLATION_PREFIX/bin/pecl update-channels;
rm -rf /tmp/pear ~/.pearrc
if [ $PHP_MAJOR == '7' ] && [ $PHP_MINOR != '0' ]; then
PHP_INI_DIR=$PHP_INI_DIR php=$INSTALLATION_PREFIX/bin/php /php/docker-php-ext-enable.sh sodium
fi
compressedSdkDir="/tmp/compressedSdk"
mkdir -p $compressedSdkDir
cd "$INSTALLATION_PREFIX"
tar -zcf $compressedSdkDir/php-$PHP_VERSION.tar.gz .

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

@ -0,0 +1,69 @@
#!/bin/sh
set -e
# prefer user supplied CFLAGS, but default to our PHP_CFLAGS
: ${CFLAGS:=$PHP_CFLAGS}
: ${CPPFLAGS:=$PHP_CPPFLAGS}
: ${LDFLAGS:=$PHP_LDFLAGS}
export CFLAGS CPPFLAGS LDFLAGS
srcExists=
if [ -d /usr/src/php ]; then
srcExists=1
fi
docker-php-source extract
if [ -z "$srcExists" ]; then
touch /usr/src/php/.docker-delete-me
fi
cd /usr/src/php/ext
usage() {
echo "usage: $0 ext-name [configure flags]"
echo " ie: $0 gd --with-jpeg-dir=/usr/local/something"
echo
echo 'Possible values for ext-name:'
find . \
-mindepth 2 \
-maxdepth 2 \
-type f \
-name 'config.m4' \
| xargs -n1 dirname \
| xargs -n1 basename \
| sort \
| xargs
echo
echo 'Some of the above modules are already compiled into PHP; please check'
echo 'the output of "php -i" to see which modules are already loaded.'
}
ext="$1"
if [ -z "$ext" ] || [ ! -d "$ext" ]; then
usage >&2
exit 1
fi
shift
pm='unknown'
if [ -e /lib/apk/db/installed ]; then
pm='apk'
fi
if [ "$pm" = 'apk' ]; then
if \
[ -n "$PHPIZE_DEPS" ] \
&& ! apk info --installed .phpize-deps > /dev/null \
&& ! apk info --installed .phpize-deps-configure > /dev/null \
; then
apk add --no-cache --virtual .phpize-deps-configure $PHPIZE_DEPS
fi
fi
if command -v dpkg-architecture > /dev/null; then
gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"
set -- --build="$gnuArch" "$@"
fi
cd "$ext"
phpize
./configure "$@"

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

@ -0,0 +1,114 @@
#!/bin/sh
set -e
extDir="$($php -r 'echo ini_get("extension_dir");')"
cd "$extDir"
usage() {
echo "usage: $0 [options] module-name [module-name ...]"
echo " ie: $0 gd mysqli"
echo " $0 pdo pdo_mysql"
echo " $0 --ini-name 0-apc.ini apcu apc"
echo
echo 'Possible values for module-name:'
find -maxdepth 1 \
-type f \
-name '*.so' \
-exec basename '{}' ';' \
| sort \
| xargs
echo
echo 'Some of the above modules are already compiled into PHP; please check'
echo 'the output of "php -i" to see which modules are already loaded.'
}
opts="$(getopt -o 'h?' --long 'help,ini-name:' -- "$@" || { usage >&2 && false; })"
eval set -- "$opts"
iniName=
while true; do
flag="$1"
shift
case "$flag" in
--help|-h|'-?') usage && exit 0 ;;
--ini-name) iniName="$1" && shift ;;
--) break ;;
*)
{
echo "error: unknown flag: $flag"
usage
} >&2
exit 1
;;
esac
done
modules=
for module; do
if [ -z "$module" ]; then
continue
fi
if [ -f "$module.so" ] && ! [ -f "$module" ]; then
# allow ".so" to be optional
module="$module.so"
fi
if ! [ -f "$module" ]; then
echo >&2 "error: '$module' does not exist"
echo >&2
usage >&2
exit 1
fi
modules="$modules $module"
done
if [ -z "$modules" ]; then
usage >&2
exit 1
fi
pm='unknown'
if [ -e /lib/apk/db/installed ]; then
pm='apk'
fi
apkDel=
if [ "$pm" = 'apk' ]; then
if \
[ -n "$PHPIZE_DEPS" ] \
&& ! apk info --installed .phpize-deps > /dev/null \
&& ! apk info --installed .phpize-deps-configure > /dev/null \
; then
apk add --no-cache --virtual '.docker-php-ext-enable-deps' binutils
apkDel='.docker-php-ext-enable-deps'
fi
fi
for module in $modules; do
if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then
# https://wiki.php.net/internals/extensions#loading_zend_extensions
absModule="$(readlink -f "$module")"
line="zend_extension=$absModule"
else
line="extension=$module"
fi
ext="$(basename "$module")"
ext="${ext%.*}"
if $php -r 'exit(extension_loaded("'"$ext"'") ? 0 : 1);'; then
# this isn't perfect, but it's better than nothing
# (for example, 'opcache.so' presents inside PHP as 'Zend OPcache', not 'opcache')
echo >&2
echo >&2 "warning: $ext ($module) is already loaded!"
echo >&2
continue
fi
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
if ! grep -q "$line" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done
if [ "$pm" = 'apk' ] && [ -n "$apkDel" ]; then
apk del $apkDel
fi

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

@ -0,0 +1,122 @@
#!/bin/sh
set -e
# prefer user supplied CFLAGS, but default to our PHP_CFLAGS
: ${CFLAGS:=$PHP_CFLAGS}
: ${CPPFLAGS:=$PHP_CPPFLAGS}
: ${LDFLAGS:=$PHP_LDFLAGS}
export CFLAGS CPPFLAGS LDFLAGS
srcExists=
if [ -d /usr/src/php ]; then
srcExists=1
fi
docker-php-source extract
if [ -z "$srcExists" ]; then
touch /usr/src/php/.docker-delete-me
fi
cd /usr/src/php/ext
usage() {
echo "usage: $0 [-jN] ext-name [ext-name ...]"
echo " ie: $0 gd mysqli"
echo " $0 pdo pdo_mysql"
echo " $0 -j5 gd mbstring mysqli pdo pdo_mysql shmop"
echo
echo 'if custom ./configure arguments are necessary, see docker-php-ext-configure'
echo
echo 'Possible values for ext-name:'
find . \
-mindepth 2 \
-maxdepth 2 \
-type f \
-name 'config.m4' \
| xargs -n1 dirname \
| xargs -n1 basename \
| sort \
| xargs
echo
echo 'Some of the above modules are already compiled into PHP; please check'
echo 'the output of "php -i" to see which modules are already loaded.'
}
opts="$(getopt -o 'h?j:' --long 'help,jobs:' -- "$@" || { usage >&2 && false; })"
eval set -- "$opts"
j=1
while true; do
flag="$1"
shift
case "$flag" in
--help|-h|'-?') usage && exit 0 ;;
--jobs|-j) j="$1" && shift ;;
--) break ;;
*)
{
echo "error: unknown flag: $flag"
usage
} >&2
exit 1
;;
esac
done
exts=
for ext; do
if [ -z "$ext" ]; then
continue
fi
if [ ! -d "$ext" ]; then
echo >&2 "error: $PWD/$ext does not exist"
echo >&2
usage >&2
exit 1
fi
exts="$exts $ext"
done
if [ -z "$exts" ]; then
usage >&2
exit 1
fi
pm='unknown'
if [ -e /lib/apk/db/installed ]; then
pm='apk'
fi
apkDel=
if [ "$pm" = 'apk' ]; then
if [ -n "$PHPIZE_DEPS" ]; then
if apk info --installed .phpize-deps-configure > /dev/null; then
apkDel='.phpize-deps-configure'
elif ! apk info --installed .phpize-deps > /dev/null; then
apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS
apkDel='.phpize-deps'
fi
fi
fi
popDir="$PWD"
for ext in $exts; do
cd "$ext"
[ -e Makefile ] || docker-php-ext-configure "$ext"
make -j"$j"
make -j"$j" install
find modules \
-maxdepth 1 \
-name '*.so' \
-exec basename '{}' ';' \
| xargs -r docker-php-ext-enable
make -j"$j" clean
cd "$popDir"
done
if [ "$pm" = 'apk' ] && [ -n "$apkDel" ]; then
apk del $apkDel
fi
if [ -e /usr/src/php/.docker-delete-me ]; then
docker-php-source delete
fi

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

@ -0,0 +1,34 @@
#!/bin/sh
set -e
dir=/usr/src/php
usage() {
echo "usage: $0 COMMAND"
echo
echo "Manage php source tarball lifecycle."
echo
echo "Commands:"
echo " extract extract php source tarball into directory $dir if not already done."
echo " delete delete extracted php source located into $dir if not already done."
echo
}
case "$1" in
extract)
mkdir -p "$dir"
if [ ! -f "$dir/.docker-extracted" ]; then
tar -Jxf /usr/src/php.tar.xz -C "$dir" --strip-components=1
touch "$dir/.docker-extracted"
fi
;;
delete)
rm -rf "$dir"
;;
*)
usage
exit 1
;;
esac

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

@ -0,0 +1,45 @@
#!/bin/bash
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
# --------------------------------------------------------------------------------------------
set -eux
# prevent Debian's PHP packages from being installed
# https://github.com/docker-library/php/pull/542
{
echo 'Package: php*';
echo 'Pin: release *';
echo 'Pin-Priority: -1';
} > /etc/apt/preferences.d/no-debian-php
# dependencies required for running "phpize"
# (see persistent deps below)
PHPIZE_DEPS="autoconf dpkg-dev file g++ gcc libc-dev make pkg-config re2c"
# persistent / runtime deps
apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y \
$PHPIZE_DEPS \
ca-certificates \
curl \
xz-utils \
libonig-dev \
--no-install-recommends && rm -r /var/lib/apt/lists/*
##<argon2>##
sed -e 's/stretch/buster/g' /etc/apt/sources.list > /etc/apt/sources.list.d/buster.list;
{ \
echo 'Package: *';
echo 'Pin: release n=buster';
echo 'Pin-Priority: -10';
echo;
echo 'Package: libargon2*';
echo 'Pin: release n=buster';
echo 'Pin-Priority: 990';
} > /etc/apt/preferences.d/argon2-buster;
apt-get update;
apt-get install -y --no-install-recommends libargon2-dev libsodium-dev;
##</argon2>##

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

@ -0,0 +1,9 @@
# version, sha, gpg keys, dockerfile
5.6.40, 1369a51eee3995d7fbd1c5342e5cc917760e276d561595b6052b21ace2656d1c, 0BD78B5F97500D450838F95DFE857D9A90D90EC1 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3,
7.0.33, ab8c5be6e32b1f8d032909dedaaaa4bbb1a209e519abb01a52ce3914f9a13d96, 1A4E8B7277C42E53DBA9C7B9BCAA30EA9C0D5763 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3,
7.2.18, 9970dbb3ab1298c9e6aac54bebfa841c8ad14b18eead65594a68fa841364cb8d, 1729F83938DA44E27BA0F4D3DBDB397470D12172 B1B44D8F021E4E2D6021E995DC9FF8D3EE5AF27F,
7.2.25, 746efeedc38e6ff7b1ec1432440f5fa801537adf6cd21e4afb3f040e5b0760a9, 1729F83938DA44E27BA0F4D3DBDB397470D12172 B1B44D8F021E4E2D6021E995DC9FF8D3EE5AF27F,
7.2.26, 1dd3bc875e105f5c9d21fb4dc240670bd2c22037820ff03890f5ab883c88b78d, 1729F83938DA44E27BA0F4D3DBDB397470D12172 B1B44D8F021E4E2D6021E995DC9FF8D3EE5AF27F,
7.3.5, e1011838a46fd4a195c8453b333916622d7ff5bce4aca2d9d99afac142db2472, CBAF69F173A0FEA4B537F470D66C9593118BCCB6 F38252826ACD957EF380D39F2F7956BC5DA04B5D, 7.3/Dockerfile
7.3.12, aafe5e9861ad828860c6af8c88cdc1488314785962328eb1783607c1fdd855df, CBAF69F173A0FEA4B537F470D66C9593118BCCB6 F38252826ACD957EF380D39F2F7956BC5DA04B5D,
7.3.13, 57ac55fe442d2da650abeb9e6fa161bd3a98ba6528c029f076f8bba43dd5c228, CBAF69F173A0FEA4B537F470D66C9593118BCCB6 F38252826ACD957EF380D39F2F7956BC5DA04B5D,

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

@ -0,0 +1,9 @@
FROM python-build-prereqs
WORKDIR /usr/src/python
ARG VERSION_TO_BUILD
ARG GPG_KEYS
ARG PIP_VERSION
RUN PYTHON_VERSION=$VERSION_TO_BUILD \
GPG_KEY=$GPG_KEYS \
PIP_VERSION=$PIP_VERSION \
/tmp/build.sh

74
platforms/python/buildPython.sh Executable file
Просмотреть файл

@ -0,0 +1,74 @@
#!/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/__pythonVersions.sh
pythonPlatformDir="$REPO_DIR/platforms/python"
builtPythonPrereqs=false
buildPythonPrereqsImage() {
if ! $builtPythonPrereqs; then
echo "Building Python pre-requisites image..."
echo
docker build -f "$pythonPlatformDir/prereqs/Dockerfile" -t "python-build-prereqs" $REPO_DIR
builtPythonPrereqs=true
fi
}
buildPython() {
local version="$1"
local gpgKey="$2"
local pipVersion="$3"
local dockerFile="$4"
local imageName="oryx/python"
local targetDir="$volumeHostDir/python"
mkdir -p "$targetDir"
if blobExists python python-$version.tar.gz; then
echo "Python version '$version' already present in blob storage. Skipping building it..."
echo
else
if ! $builtPythonPrereqs; then
buildPythonPrereqsImage
fi
echo "Python version '$version' not present in blob storage. Building it in a docker image..."
echo
if [ -z "$dockerFile" ]; then
# Use common docker file
dockerFile="$pythonPlatformDir/Dockerfile"
else
dockerFile="$pythonPlatformDir/$dockerFile"
fi
if [ -z "$pipVersion" ]; then
# Use default pip version
pipVersion="$PIP_VERSION"
fi
docker build \
-f "$dockerFile" \
--build-arg VERSION_TO_BUILD=$version \
--build-arg GPG_KEYS=$gpgKey \
--build-arg PIP_VERSION=$pipVersion \
-t $imageName \
$REPO_DIR
getSdkFromImage $imageName "$targetDir"
fi
echo "$version" >> "$targetDir/available_versions.txt"
}
echo "Building Python..."
echo
buildPlatform "$pythonPlatformDir/versionsToBuild.txt" buildPython

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

@ -0,0 +1,13 @@
# Install Python build prerequisites
FROM buildpack-deps:stretch
COPY build/__pythonVersions.sh /tmp/
COPY platforms/python/prereqs/build.sh /tmp/
COPY images/receiveGpgKeys.sh /tmp/receiveGpgKeys.sh
RUN chmod +x /tmp/receiveGpgKeys.sh
RUN chmod +x /tmp/build.sh && \
apt-get update && \
apt-get install -y --no-install-recommends \
tk-dev \
uuid-dev \
libgeos-dev

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

@ -0,0 +1,77 @@
#!/bin/bash
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
# --------------------------------------------------------------------------------------------
set -ex
wget https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz -O /python.tar.xz
wget https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc -O /python.tar.xz.asc
# Try getting the keys 5 times at most
/tmp/receiveGpgKeys.sh $GPG_KEY
gpg --batch --verify /python.tar.xz.asc /python.tar.xz
tar -xJf /python.tar.xz --strip-components=1 -C .
INSTALLATION_PREFIX=/opt/python/$PYTHON_VERSION
if [ "${PYTHON_VERSION::1}" == "2" ]; then
./configure \
--prefix=$INSTALLATION_PREFIX \
--build=$(dpkg-architecture --query DEB_BUILD_GNU_TYPE) \
--enable-shared \
--enable-unicode=ucs4
else
./configure \
--prefix=$INSTALLATION_PREFIX \
--build=$(dpkg-architecture --query DEB_BUILD_GNU_TYPE) \
--enable-loadable-sqlite-extensions \
--enable-shared \
--with-system-expat \
--with-system-ffi \
--without-ensurepip
fi
make -j $(nproc)
make install
# Install pip
wget https://bootstrap.pypa.io/get-pip.py -O /get-pip.py
LD_LIBRARY_PATH=/usr/src/python \
/usr/src/python/python /get-pip.py \
--prefix $INSTALLATION_PREFIX \
--disable-pip-version-check \
--no-cache-dir \
--no-warn-script-location \
pip==$PIP_VERSION
if [ "${PYTHON_VERSION::1}" == "2" ]; then
LD_LIBRARY_PATH=$INSTALLATION_PREFIX/lib \
$INSTALLATION_PREFIX/bin/pip install --no-cache-dir virtualenv
fi
# Currently only for version '2' of Python, the alias 'python' exists in the 'bin'
# directory. So to make sure other versions also have this alias, we create the link
# explicitly here. This is for the scenarios where a user does 'benv python=3.7' and
# expects the alias 'python' to point to '3.7' rather than '2'. In cases where benv is
# not passed as an explicit python version, the version '2' is used by default. This is
# done in the Dockerfile.
pythonBinDir="$INSTALLATION_PREFIX/bin"
pythonAliasFile="$pythonBinDir/python"
if [ ! -e "$pythonAliasFile" ]; then
IFS='.' read -ra SPLIT_VERSION <<< "$PYTHON_VERSION"
majorAndMinorParts="${SPLIT_VERSION[0]}.${SPLIT_VERSION[1]}"
ln -s $pythonBinDir/python$majorAndMinorParts $pythonBinDir/python
fi
# Replace log level in pip's code as a workaround for https://github.com/pypa/pip/issues/6189
pipReqSetPath=`find $INSTALLATION_PREFIX/lib -path "*site-packages/pip/_internal/req/req_set.py"`
sed -i 's|logger\.debug('\''Cleaning up\.\.\.'\'')|logger\.info('\''Cleaning up\.\.\.'\'')|' "$pipReqSetPath"
compressedSdkDir="/tmp/compressedSdk"
mkdir -p $compressedSdkDir
cd "$INSTALLATION_PREFIX"
tar -zcf $compressedSdkDir/python-$PYTHON_VERSION.tar.gz .

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

@ -0,0 +1,13 @@
# version, gpg keys, pipVersion
2.7.16, C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF,
2.7.17, C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF,
3.6.9, 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D,
3.6.10, 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D,
3.7.3, 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D,
3.7.4, 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D,
3.7.5, 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D,
3.7.6, 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D,
3.8.0, E3FF2839C048B25C084DEBE9B26995E310250568,
3.8.0b3, E3FF2839C048B25C084DEBE9B26995E310250568,
3.8.0b4, E3FF2839C048B25C084DEBE9B26995E310250568,
3.8.1, E3FF2839C048B25C084DEBE9B26995E310250568,

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

@ -4,7 +4,7 @@ namespace Microsoft.Oryx.BuildScriptGenerator.DotNetCore
{
public static class DotNetCoreRunTimeVersions
{
public const string DotNetCoreRuntimeBaseTag = "20200121.5";
public const string DotNetCoreRuntimeBaseTag = "20200129.1";
public const string NetCoreApp10 = "1.0.16";
public const string NetCoreApp11 = "1.1.13";
public const string NetCoreApp20 = "2.0.9";

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

@ -4,8 +4,8 @@ namespace Microsoft.Oryx.BuildScriptGenerator.Node
{
public static class NodeVersions
{
public const string NodeRuntimeBaseTag = "20200121.9";
public const string YarnCacheBaseTag = "20200121.9";
public const string NodeRuntimeBaseTag = "20200129.1";
public const string YarnCacheBaseTag = "20200129.1";
public const string YarnVersion = "1.17.3";
public const string YarnMinorVersion = "1.17";
public const string YarnMajorVersion = "1";

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

@ -4,9 +4,9 @@ namespace Microsoft.Oryx.Common
{
public static class PhpVersions
{
public const string PhpBuildBaseTag = "20200128.2";
public const string PhpRuntimeBaseTag = "20200128.2";
public const string PhpFpmRuntimeBaseTag = "20200128.2";
public const string PhpBuildBaseTag = "20200129.1";
public const string PhpRuntimeBaseTag = "20200129.1";
public const string PhpFpmRuntimeBaseTag = "20200129.1";
public const string ComposerVersion = "1.9.2";
public const string ComposerSha384 = "c5b9b6d368201a9db6f74e2611495f369991b72d9c8cbd3ffbc63edff210eb73d46ffbfce88669ad33695ef77dc76976";
public const string Php73Version = "7.3.13";

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

@ -4,7 +4,7 @@ namespace Microsoft.Oryx.Common
{
public static class PythonVersions
{
public const string PythonBaseTag = "20200121.5";
public const string PythonBaseTag = "20200129.1";
public const string PipVersion = "19.3.1";
public const string Python27Version = "2.7.17";
public const string Python36Version = "3.6.10";

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

@ -14,20 +14,6 @@ stages:
imageDir: node
artifactsFileName: node-runtimeimage-bases.txt
- template: templates/_buildimageBasesJobTemplate.yml
parameters:
displayName: Build and push Python base images for build
scriptPath: ./build/buildBuildImageBases.sh
imageDir: python
artifactsFileName: python-buildimage-bases.txt
- template: templates/_buildimageBasesJobTemplate.yml
parameters:
displayName: Build and push PHP build base images
scriptPath: ./build/buildBuildImageBases.sh
imageDir: php
artifactsFileName: php-buildimage-bases.txt
- template: templates/_buildimageBasesJobTemplate.yml
parameters:
displayName: Build and push PHP runtime base images

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

@ -0,0 +1,70 @@
variables:
- group: Oryx
stages:
- stage: Build
jobs:
- job: Python
pool:
name: OryxLinux
steps:
- template: templates/_platformBinariesTemplate.yml
parameters:
platformName: 'python'
- job: Php
pool:
name: OryxLinux
steps:
- template: templates/_platformBinariesTemplate.yml
parameters:
platformName: 'php'
- job: Node
pool:
name: OryxLinux
steps:
- template: templates/_platformBinariesTemplate.yml
parameters:
platformName: 'node'
- job: DotNetCore
pool:
name: OryxLinux
steps:
- template: templates/_platformBinariesTemplate.yml
parameters:
platformName: 'dotnet'
- stage: Release
dependsOn: Build
jobs:
- job: Publish_Platform_Binaries
displayName: Publish to Azure Blob Storage
pool:
name: OryxLinux
steps:
- task: DownloadBuildArtifacts@0
displayName: 'Download Artifacts'
inputs:
artifactName: drop
- task: AzureCLI@1
displayName: Upload files to Azure Storage
inputs:
azureSubscription: oryxSP
scriptPath: ./vsts/scripts/publishFilesToAzureStorage.sh
arguments: oryxsdksdev
trigger:
branches:
include:
- master
paths:
include:
- images/build/python
- images/build/php
- images/build/dotnet
- images/build/node
- build/
- vsts/

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

@ -0,0 +1,27 @@
parameters:
platformName: ''
steps:
- checkout: self
clean: true
- task: ShellScript@2
displayName: 'Building platform binaries'
inputs:
scriptPath: ./build/buildPlatformBinaries.sh
args: ${{ parameters.platformName }}
- task: CopyFiles@2
displayName: 'Copy artifacts from source repo to agent artifacts folder'
inputs:
sourceFolder: '$(Build.SourcesDirectory)/artifacts'
contents: '**/*.*'
targetFolder: $(Build.ArtifactStagingDirectory)
overWrite: true
condition: true
- task: PublishBuildArtifacts@1
displayName: Publish build artifacts
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)
condition: true

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

@ -1,14 +1,4 @@
jobs:
- job: Release_PhpBuildBaseImage
displayName: Push PHP Build Base Image to MCR
timeoutInMinutes: 250
pool:
name: OryxLinux
steps:
- template: _releaseBaseImagesStepTemplate.yml
parameters:
baseImageName: 'php-build'
- job: Release_PhpRuntimeBaseImage
displayName: Push PHP Runtime Base Image to MCR
timeoutInMinutes: 250
@ -38,16 +28,6 @@ jobs:
parameters:
baseImageName: 'dotnetcore'
- job: Release_PythonBaseImage
displayName: Push Python Build Base Image to MCR
timeoutInMinutes: 250
pool:
name: OryxLinux
steps:
- template: _releaseBaseImagesStepTemplate.yml
parameters:
baseImageName: 'python-build'
- job: Release_NodeBaseImage
displayName: Push Node Base Image to MCR
timeoutInMinutes: 250

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

@ -102,6 +102,12 @@ steps:
enforceDockerNamingConvention: false
condition: and(succeeded(), eq(variables['ReleaseRuntimeImages'], 'true'))
- task: AzureCLI@1
displayName: Upload files to Azure Storage
inputs:
azureSubscription: oryxSP
scriptPath: ./vsts/scripts/publishFilesToAzureStorage.sh oryxsdks
- task: ShellScript@2
displayName: 'Clean up Docker containers and images'
inputs:

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

@ -0,0 +1,37 @@
#!/bin/bash
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
# --------------------------------------------------------------------------------------------
set -ex
commit=$(git rev-parse HEAD)
storageAccount="$1"
uploadFiles() {
local platform="$1"
local artifactsDir="$BUILD_ARTIFACTSTAGINGDIRECTORY/drop/platformSdks/$platform"
allFiles=$(find $artifactsDir -type f -name '*.*')
for fileToUpload in $allFiles
do
checksum=$(sha512sum $fileToUpload | cut -d " " -f 1)
fileName=$(basename $fileToUpload)
az storage blob upload \
--name $fileName \
--file "$fileToUpload" \
--container-name $platform \
--account-name $storageAccount \
--metadata \
buildnumber="$BUILD_BUILDNUMBER" \
commit="$commit" \
branch="$BUILD_SOURCEBRANCHNAME" \
checksum="$checksum"
done
}
platforms=("nodejs" "python" "dotnet" "php" "php-composer")
for platform in "${platforms[@]}"
do
uploadFiles $platform
done