diff --git a/host/3.0/buster/amd64/base/generate-composite.sh b/host/3.0/buster/amd64/base/generate-composite.sh index f4a5e0890..d4bd01067 100755 --- a/host/3.0/buster/amd64/base/generate-composite.sh +++ b/host/3.0/buster/amd64/base/generate-composite.sh @@ -121,7 +121,7 @@ fi if [ ${#argarray[@]} == 1 ] && [ "$argarray" == "all" ]; then echo "All supported languages targetted." - supportedlangs=("java") + supportedlangs=("java" "node" "python") argarray=(${supportedlangs[@]}) fi diff --git a/host/3.0/buster/amd64/base/host.Dockerfile b/host/3.0/buster/amd64/base/host.Dockerfile index 4dd0fc9c3..a923b935a 100755 --- a/host/3.0/buster/amd64/base/host.Dockerfile +++ b/host/3.0/buster/amd64/base/host.Dockerfile @@ -13,7 +13,8 @@ RUN BUILD_NUMBER=$(echo ${HOST_VERSION} | cut -d'.' -f 3) && \ HOST_COMMIT=$(git rev-list -1 HEAD) && \ dotnet publish -v q /p:BuildNumber=$BUILD_NUMBER /p:CommitHash=$HOST_COMMIT src/WebJobs.Script.WebHost/WebJobs.Script.WebHost.csproj -c Release --output /azure-functions-host --runtime linux-x64 && \ mv /azure-functions-host/workers /workers && mkdir /azure-functions-host/workers && \ - rm -rf /root/.local /root/.nuget /src + rm -rf /root/.local /root/.nuget /src && \ + find /workers/node/grpc/src/node/extension_binary/ -mindepth 1 -type d ! -regex ".*linux-x64.*" -prune -exec rm -rf '{}' \; RUN EXTENSION_BUNDLE_VERSION=1.8.1 && \ EXTENSION_BUNDLE_FILENAME=Microsoft.Azure.Functions.ExtensionBundle.1.8.1_linux-x64.zip && \ @@ -36,4 +37,3 @@ RUN EXTENSION_BUNDLE_VERSION=1.8.1 && \ unzip /$EXTENSION_BUNDLE_FILENAME_V3 -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3 && \ rm -f /$EXTENSION_BUNDLE_FILENAME_V3 &&\ find /FuncExtensionBundles/ -type f -exec chmod 644 {} \; - diff --git a/host/3.0/buster/amd64/node/node10/node10-appservice.Dockerfile b/host/3.0/buster/amd64/node/node10/node10-appservice.Dockerfile deleted file mode 100644 index 984095de1..000000000 --- a/host/3.0/buster/amd64/node/node10/node10-appservice.Dockerfile +++ /dev/null @@ -1,77 +0,0 @@ -# Build the runtime from source -ARG HOST_VERSION=3.3.1 -FROM mcr.microsoft.com/dotnet/sdk:5.0 AS runtime-image -ARG HOST_VERSION - -ENV PublishWithAspNetCoreTargetManifest=false - -RUN BUILD_NUMBER=$(echo ${HOST_VERSION} | cut -d'.' -f 3) && \ - git clone --branch v${HOST_VERSION} https://github.com/Azure/azure-functions-host /src/azure-functions-host && \ - cd /src/azure-functions-host && \ - HOST_COMMIT=$(git rev-list -1 HEAD) && \ - dotnet publish -v q /p:BuildNumber=$BUILD_NUMBER /p:CommitHash=$HOST_COMMIT src/WebJobs.Script.WebHost/WebJobs.Script.WebHost.csproj -c Release --output /azure-functions-host --runtime linux-x64 && \ - mv /azure-functions-host/workers /workers && mkdir /azure-functions-host/workers && \ - rm -rf /root/.local /root/.nuget /src && \ - find /workers/node/grpc/src/node/extension_binary/ -mindepth 1 -type d ! -regex ".*linux-x64.*" -prune -exec rm -rf '{}' \; - -RUN EXTENSION_BUNDLE_VERSION=1.8.1 && \ - EXTENSION_BUNDLE_FILENAME=Microsoft.Azure.Functions.ExtensionBundle.1.8.1_linux-x64.zip && \ - apt-get update && \ - apt-get install -y gnupg wget unzip && \ - wget https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION/$EXTENSION_BUNDLE_FILENAME && \ - mkdir -p /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION && \ - unzip /$EXTENSION_BUNDLE_FILENAME -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION && \ - rm -f /$EXTENSION_BUNDLE_FILENAME && \ - EXTENSION_BUNDLE_VERSION_V2=2.8.3 && \ - EXTENSION_BUNDLE_FILENAME_V2=Microsoft.Azure.Functions.ExtensionBundle.${EXTENSION_BUNDLE_VERSION_V2}_linux-x64.zip && \ - wget https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2/$EXTENSION_BUNDLE_FILENAME_V2 && \ - mkdir -p /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2 && \ - unzip /$EXTENSION_BUNDLE_FILENAME_V2 -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2 && \ - rm -f /$EXTENSION_BUNDLE_FILENAME_V2 &&\ - EXTENSION_BUNDLE_VERSION_V3=3.0.0 && \ - EXTENSION_BUNDLE_FILENAME_V3=Microsoft.Azure.Functions.ExtensionBundle.${EXTENSION_BUNDLE_VERSION_V3}_linux-x64.zip && \ - wget https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3/$EXTENSION_BUNDLE_FILENAME_V3 && \ - mkdir -p /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3 && \ - unzip /$EXTENSION_BUNDLE_FILENAME_V3 -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3 && \ - rm -f /$EXTENSION_BUNDLE_FILENAME_V3 &&\ - find /FuncExtensionBundles/ -type f -exec chmod 644 {} \; - -FROM mcr.microsoft.com/dotnet/core/runtime-deps:3.1 -ARG HOST_VERSION - -RUN apt-get update && \ - apt-get install -y curl gnupg && \ - curl -sL https://deb.nodesource.com/setup_10.x | bash - && \ - apt-get update && \ - apt-get install -y nodejs - -# Chrome headless dependencies -# https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#chrome-headless-doesnt-launch-on-unix -RUN apt-get install -y xvfb gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 \ - libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 \ - libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 \ - libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 \ - libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget - -ENV AzureWebJobsScriptRoot=/home/site/wwwroot \ - HOME=/home \ - FUNCTIONS_WORKER_RUNTIME=node \ - DOTNET_USE_POLLING_FILE_WATCHER=true \ - HOST_VERSION=${HOST_VERSION} - -COPY --from=runtime-image [ "/azure-functions-host", "/azure-functions-host" ] -COPY --from=runtime-image [ "/workers/node", "/azure-functions-host/workers/node" ] -COPY --from=runtime-image [ "/FuncExtensionBundles", "/FuncExtensionBundles" ] - -EXPOSE 2222 80 - -RUN apt-get update && \ - apt-get install -y --no-install-recommends openssh-server dialog && \ - echo "root:Docker!" | chpasswd - -COPY sshd_config /etc/ssh/ -COPY start.sh /azure-functions-host/ - -RUN chmod +x /azure-functions-host/start.sh - -ENTRYPOINT ["/azure-functions-host/start.sh"] diff --git a/host/3.0/buster/amd64/node/node10/node10-composite.template b/host/3.0/buster/amd64/node/node10/node10-composite.template new file mode 100644 index 000000000..afa7d309b --- /dev/null +++ b/host/3.0/buster/amd64/node/node10/node10-composite.template @@ -0,0 +1,39 @@ +FROM mcr.microsoft.com/dotnet/core/runtime-deps:3.1 +ARG HOST_VERSION + +RUN apt-get update && \ + apt-get install -y curl gnupg && \ + curl -sL https://deb.nodesource.com/setup_10.x | bash - && \ + apt-get update && \ + apt-get install -y nodejs + +# Chrome headless dependencies +# https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#chrome-headless-doesnt-launch-on-unix +RUN apt-get install -y xvfb gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 \ + libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 \ + libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 \ + libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 \ + libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget + +ENV AzureWebJobsScriptRoot=/home/site/wwwroot \ + HOME=/home \ + FUNCTIONS_WORKER_RUNTIME=node \ + DOTNET_USE_POLLING_FILE_WATCHER=true \ + HOST_VERSION=${HOST_VERSION} + +COPY --from=runtime-image [ "/azure-functions-host", "/azure-functions-host" ] +COPY --from=runtime-image [ "/workers/node", "/azure-functions-host/workers/node" ] +COPY --from=runtime-image [ "/FuncExtensionBundles", "/FuncExtensionBundles" ] + +EXPOSE 2222 80 + +RUN apt-get update && \ + apt-get install -y --no-install-recommends openssh-server dialog && \ + echo "root:Docker!" | chpasswd + +COPY sshd_config /etc/ssh/ +COPY start.sh /azure-functions-host/ + +RUN chmod +x /azure-functions-host/start.sh + +ENTRYPOINT ["/azure-functions-host/start.sh"] diff --git a/host/3.0/buster/amd64/node/node12/node12-appservice.Dockerfile b/host/3.0/buster/amd64/node/node12/node12-appservice.Dockerfile deleted file mode 100644 index 23e408c6f..000000000 --- a/host/3.0/buster/amd64/node/node12/node12-appservice.Dockerfile +++ /dev/null @@ -1,77 +0,0 @@ -# Build the runtime from source -ARG HOST_VERSION=3.3.1 -FROM mcr.microsoft.com/dotnet/sdk:5.0 AS runtime-image -ARG HOST_VERSION - -ENV PublishWithAspNetCoreTargetManifest=false - -RUN BUILD_NUMBER=$(echo ${HOST_VERSION} | cut -d'.' -f 3) && \ - git clone --branch v${HOST_VERSION} https://github.com/Azure/azure-functions-host /src/azure-functions-host && \ - cd /src/azure-functions-host && \ - HOST_COMMIT=$(git rev-list -1 HEAD) && \ - dotnet publish -v q /p:BuildNumber=$BUILD_NUMBER /p:CommitHash=$HOST_COMMIT src/WebJobs.Script.WebHost/WebJobs.Script.WebHost.csproj -c Release --output /azure-functions-host --runtime linux-x64 && \ - mv /azure-functions-host/workers /workers && mkdir /azure-functions-host/workers && \ - rm -rf /root/.local /root/.nuget /src && \ - find /workers/node/grpc/src/node/extension_binary/ -mindepth 1 -type d ! -regex ".*linux-x64.*" -prune -exec rm -rf '{}' \; - -RUN EXTENSION_BUNDLE_VERSION=1.8.1 && \ - EXTENSION_BUNDLE_FILENAME=Microsoft.Azure.Functions.ExtensionBundle.1.8.1_linux-x64.zip && \ - apt-get update && \ - apt-get install -y gnupg wget unzip && \ - wget https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION/$EXTENSION_BUNDLE_FILENAME && \ - mkdir -p /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION && \ - unzip /$EXTENSION_BUNDLE_FILENAME -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION && \ - rm -f /$EXTENSION_BUNDLE_FILENAME && \ - EXTENSION_BUNDLE_VERSION_V2=2.8.3 && \ - EXTENSION_BUNDLE_FILENAME_V2=Microsoft.Azure.Functions.ExtensionBundle.${EXTENSION_BUNDLE_VERSION_V2}_linux-x64.zip && \ - wget https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2/$EXTENSION_BUNDLE_FILENAME_V2 && \ - mkdir -p /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2 && \ - unzip /$EXTENSION_BUNDLE_FILENAME_V2 -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2 && \ - rm -f /$EXTENSION_BUNDLE_FILENAME_V2 &&\ - EXTENSION_BUNDLE_VERSION_V3=3.0.0 && \ - EXTENSION_BUNDLE_FILENAME_V3=Microsoft.Azure.Functions.ExtensionBundle.${EXTENSION_BUNDLE_VERSION_V3}_linux-x64.zip && \ - wget https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3/$EXTENSION_BUNDLE_FILENAME_V3 && \ - mkdir -p /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3 && \ - unzip /$EXTENSION_BUNDLE_FILENAME_V3 -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3 && \ - rm -f /$EXTENSION_BUNDLE_FILENAME_V3 &&\ - find /FuncExtensionBundles/ -type f -exec chmod 644 {} \; - -FROM mcr.microsoft.com/dotnet/core/runtime-deps:3.1 -ARG HOST_VERSION - -RUN apt-get update && \ - apt-get install -y curl gnupg && \ - curl -sL https://deb.nodesource.com/setup_12.x | bash - && \ - apt-get update && \ - apt-get install -y nodejs - -# Chrome headless dependencies -# https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#chrome-headless-doesnt-launch-on-unix -RUN apt-get install -y xvfb gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 \ - libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 \ - libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 \ - libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 \ - libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget - -ENV AzureWebJobsScriptRoot=/home/site/wwwroot \ - HOME=/home \ - FUNCTIONS_WORKER_RUNTIME=node \ - DOTNET_USE_POLLING_FILE_WATCHER=true \ - HOST_VERSION=${HOST_VERSION} - -COPY --from=runtime-image [ "/azure-functions-host", "/azure-functions-host" ] -COPY --from=runtime-image [ "/workers/node", "/azure-functions-host/workers/node" ] -COPY --from=runtime-image [ "/FuncExtensionBundles", "/FuncExtensionBundles" ] - -EXPOSE 2222 80 - -RUN apt-get update && \ - apt-get install -y --no-install-recommends openssh-server dialog && \ - echo "root:Docker!" | chpasswd - -COPY sshd_config /etc/ssh/ -COPY start.sh /azure-functions-host/ - -RUN chmod +x /azure-functions-host/start.sh - -ENTRYPOINT ["/azure-functions-host/start.sh"] diff --git a/host/3.0/buster/amd64/node/node12/node12-composite.template b/host/3.0/buster/amd64/node/node12/node12-composite.template new file mode 100644 index 000000000..6de484d4f --- /dev/null +++ b/host/3.0/buster/amd64/node/node12/node12-composite.template @@ -0,0 +1,39 @@ +FROM mcr.microsoft.com/dotnet/core/runtime-deps:3.1 +ARG HOST_VERSION + +RUN apt-get update && \ + apt-get install -y curl gnupg && \ + curl -sL https://deb.nodesource.com/setup_12.x | bash - && \ + apt-get update && \ + apt-get install -y nodejs + +# Chrome headless dependencies +# https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#chrome-headless-doesnt-launch-on-unix +RUN apt-get install -y xvfb gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 \ + libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 \ + libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 \ + libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 \ + libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget + +ENV AzureWebJobsScriptRoot=/home/site/wwwroot \ + HOME=/home \ + FUNCTIONS_WORKER_RUNTIME=node \ + DOTNET_USE_POLLING_FILE_WATCHER=true \ + HOST_VERSION=${HOST_VERSION} + +COPY --from=runtime-image [ "/azure-functions-host", "/azure-functions-host" ] +COPY --from=runtime-image [ "/workers/node", "/azure-functions-host/workers/node" ] +COPY --from=runtime-image [ "/FuncExtensionBundles", "/FuncExtensionBundles" ] + +EXPOSE 2222 80 + +RUN apt-get update && \ + apt-get install -y --no-install-recommends openssh-server dialog && \ + echo "root:Docker!" | chpasswd + +COPY sshd_config /etc/ssh/ +COPY start.sh /azure-functions-host/ + +RUN chmod +x /azure-functions-host/start.sh + +ENTRYPOINT ["/azure-functions-host/start.sh"] diff --git a/host/3.0/buster/amd64/node/node14/node14-appservice.Dockerfile b/host/3.0/buster/amd64/node/node14/node14-appservice.Dockerfile deleted file mode 100644 index f6b9caf3b..000000000 --- a/host/3.0/buster/amd64/node/node14/node14-appservice.Dockerfile +++ /dev/null @@ -1,77 +0,0 @@ -# Build the runtime from source -ARG HOST_VERSION=3.3.1 -FROM mcr.microsoft.com/dotnet/sdk:5.0 AS runtime-image -ARG HOST_VERSION - -ENV PublishWithAspNetCoreTargetManifest=false - -RUN BUILD_NUMBER=$(echo ${HOST_VERSION} | cut -d'.' -f 3) && \ - git clone --branch v${HOST_VERSION} https://github.com/Azure/azure-functions-host /src/azure-functions-host && \ - cd /src/azure-functions-host && \ - HOST_COMMIT=$(git rev-list -1 HEAD) && \ - dotnet publish -v q /p:BuildNumber=$BUILD_NUMBER /p:CommitHash=$HOST_COMMIT src/WebJobs.Script.WebHost/WebJobs.Script.WebHost.csproj -c Release --output /azure-functions-host --runtime linux-x64 && \ - mv /azure-functions-host/workers /workers && mkdir /azure-functions-host/workers && \ - rm -rf /root/.local /root/.nuget /src && \ - find /workers/node/grpc/src/node/extension_binary/ -mindepth 1 -type d ! -regex ".*linux-x64.*" -prune -exec rm -rf '{}' \; - -RUN EXTENSION_BUNDLE_VERSION=1.8.1 && \ - EXTENSION_BUNDLE_FILENAME=Microsoft.Azure.Functions.ExtensionBundle.1.8.1_linux-x64.zip && \ - apt-get update && \ - apt-get install -y gnupg wget unzip && \ - wget https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION/$EXTENSION_BUNDLE_FILENAME && \ - mkdir -p /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION && \ - unzip /$EXTENSION_BUNDLE_FILENAME -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION && \ - rm -f /$EXTENSION_BUNDLE_FILENAME && \ - EXTENSION_BUNDLE_VERSION_V2=2.8.3 && \ - EXTENSION_BUNDLE_FILENAME_V2=Microsoft.Azure.Functions.ExtensionBundle.${EXTENSION_BUNDLE_VERSION_V2}_linux-x64.zip && \ - wget https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2/$EXTENSION_BUNDLE_FILENAME_V2 && \ - mkdir -p /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2 && \ - unzip /$EXTENSION_BUNDLE_FILENAME_V2 -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2 && \ - rm -f /$EXTENSION_BUNDLE_FILENAME_V2 &&\ - EXTENSION_BUNDLE_VERSION_V3=3.0.0 && \ - EXTENSION_BUNDLE_FILENAME_V3=Microsoft.Azure.Functions.ExtensionBundle.${EXTENSION_BUNDLE_VERSION_V3}_linux-x64.zip && \ - wget https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3/$EXTENSION_BUNDLE_FILENAME_V3 && \ - mkdir -p /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3 && \ - unzip /$EXTENSION_BUNDLE_FILENAME_V3 -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3 && \ - rm -f /$EXTENSION_BUNDLE_FILENAME_V3 &&\ - find /FuncExtensionBundles/ -type f -exec chmod 644 {} \; - -FROM mcr.microsoft.com/dotnet/core/runtime-deps:3.1 -ARG HOST_VERSION - -RUN apt-get update && \ - apt-get install -y curl gnupg && \ - curl -sL https://deb.nodesource.com/setup_14.x | bash - && \ - apt-get update && \ - apt-get install -y nodejs - -# Chrome headless dependencies -# https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#chrome-headless-doesnt-launch-on-unix -RUN apt-get install -y xvfb gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 \ - libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 \ - libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 \ - libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 \ - libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget - -ENV AzureWebJobsScriptRoot=/home/site/wwwroot \ - HOME=/home \ - FUNCTIONS_WORKER_RUNTIME=node \ - DOTNET_USE_POLLING_FILE_WATCHER=true \ - HOST_VERSION=${HOST_VERSION} - -COPY --from=runtime-image [ "/azure-functions-host", "/azure-functions-host" ] -COPY --from=runtime-image [ "/workers/node", "/azure-functions-host/workers/node" ] -COPY --from=runtime-image [ "/FuncExtensionBundles", "/FuncExtensionBundles" ] - -EXPOSE 2222 80 - -RUN apt-get update && \ - apt-get install -y --no-install-recommends openssh-server dialog && \ - echo "root:Docker!" | chpasswd - -COPY sshd_config /etc/ssh/ -COPY start.sh /azure-functions-host/ - -RUN chmod +x /azure-functions-host/start.sh - -ENTRYPOINT ["/azure-functions-host/start.sh"] diff --git a/host/3.0/buster/amd64/node/node14/node14-composite.template b/host/3.0/buster/amd64/node/node14/node14-composite.template new file mode 100644 index 000000000..8b774d925 --- /dev/null +++ b/host/3.0/buster/amd64/node/node14/node14-composite.template @@ -0,0 +1,39 @@ +FROM mcr.microsoft.com/dotnet/core/runtime-deps:3.1 +ARG HOST_VERSION + +RUN apt-get update && \ + apt-get install -y curl gnupg && \ + curl -sL https://deb.nodesource.com/setup_14.x | bash - && \ + apt-get update && \ + apt-get install -y nodejs + +# Chrome headless dependencies +# https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#chrome-headless-doesnt-launch-on-unix +RUN apt-get install -y xvfb gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 \ + libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 \ + libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 \ + libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 \ + libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget + +ENV AzureWebJobsScriptRoot=/home/site/wwwroot \ + HOME=/home \ + FUNCTIONS_WORKER_RUNTIME=node \ + DOTNET_USE_POLLING_FILE_WATCHER=true \ + HOST_VERSION=${HOST_VERSION} + +COPY --from=runtime-image [ "/azure-functions-host", "/azure-functions-host" ] +COPY --from=runtime-image [ "/workers/node", "/azure-functions-host/workers/node" ] +COPY --from=runtime-image [ "/FuncExtensionBundles", "/FuncExtensionBundles" ] + +EXPOSE 2222 80 + +RUN apt-get update && \ + apt-get install -y --no-install-recommends openssh-server dialog && \ + echo "root:Docker!" | chpasswd + +COPY sshd_config /etc/ssh/ +COPY start.sh /azure-functions-host/ + +RUN chmod +x /azure-functions-host/start.sh + +ENTRYPOINT ["/azure-functions-host/start.sh"] diff --git a/host/3.0/buster/amd64/node/node8/node8-appservice.Dockerfile b/host/3.0/buster/amd64/node/node8/node8-appservice.Dockerfile deleted file mode 100644 index d987f48e9..000000000 --- a/host/3.0/buster/amd64/node/node8/node8-appservice.Dockerfile +++ /dev/null @@ -1,77 +0,0 @@ -# Build the runtime from source -ARG HOST_VERSION=3.3.1 -FROM mcr.microsoft.com/dotnet/sdk:5.0 AS runtime-image -ARG HOST_VERSION - -ENV PublishWithAspNetCoreTargetManifest=false - -RUN BUILD_NUMBER=$(echo ${HOST_VERSION} | cut -d'.' -f 3) && \ - git clone --branch v${HOST_VERSION} https://github.com/Azure/azure-functions-host /src/azure-functions-host && \ - cd /src/azure-functions-host && \ - HOST_COMMIT=$(git rev-list -1 HEAD) && \ - dotnet publish -v q /p:BuildNumber=$BUILD_NUMBER /p:CommitHash=$HOST_COMMIT src/WebJobs.Script.WebHost/WebJobs.Script.WebHost.csproj -c Release --output /azure-functions-host --runtime linux-x64 && \ - mv /azure-functions-host/workers /workers && mkdir /azure-functions-host/workers && \ - rm -rf /root/.local /root/.nuget /src && \ - find /workers/node/grpc/src/node/extension_binary/ -mindepth 1 -type d ! -regex ".*linux-x64.*" -prune -exec rm -rf '{}' \; - -RUN EXTENSION_BUNDLE_VERSION=1.8.1 && \ - EXTENSION_BUNDLE_FILENAME=Microsoft.Azure.Functions.ExtensionBundle.1.8.1_linux-x64.zip && \ - apt-get update && \ - apt-get install -y gnupg wget unzip && \ - wget https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION/$EXTENSION_BUNDLE_FILENAME && \ - mkdir -p /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION && \ - unzip /$EXTENSION_BUNDLE_FILENAME -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION && \ - rm -f /$EXTENSION_BUNDLE_FILENAME && \ - EXTENSION_BUNDLE_VERSION_V2=2.8.3 && \ - EXTENSION_BUNDLE_FILENAME_V2=Microsoft.Azure.Functions.ExtensionBundle.${EXTENSION_BUNDLE_VERSION_V2}_linux-x64.zip && \ - wget https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2/$EXTENSION_BUNDLE_FILENAME_V2 && \ - mkdir -p /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2 && \ - unzip /$EXTENSION_BUNDLE_FILENAME_V2 -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2 && \ - rm -f /$EXTENSION_BUNDLE_FILENAME_V2 &&\ - EXTENSION_BUNDLE_VERSION_V3=3.0.0 && \ - EXTENSION_BUNDLE_FILENAME_V3=Microsoft.Azure.Functions.ExtensionBundle.${EXTENSION_BUNDLE_VERSION_V3}_linux-x64.zip && \ - wget https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3/$EXTENSION_BUNDLE_FILENAME_V3 && \ - mkdir -p /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3 && \ - unzip /$EXTENSION_BUNDLE_FILENAME_V3 -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3 && \ - rm -f /$EXTENSION_BUNDLE_FILENAME_V3 &&\ - find /FuncExtensionBundles/ -type f -exec chmod 644 {} \; - -FROM mcr.microsoft.com/dotnet/core/runtime-deps:3.1 -ARG HOST_VERSION - -RUN apt-get update && \ - apt-get install -y curl gnupg && \ - curl -sL https://deb.nodesource.com/setup_8.x | bash - && \ - apt-get update && \ - apt-get install -y nodejs - -# Chrome headless dependencies -# https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#chrome-headless-doesnt-launch-on-unix -RUN apt-get install -y xvfb gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 \ - libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 \ - libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 \ - libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 \ - libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget - -ENV AzureWebJobsScriptRoot=/home/site/wwwroot \ - HOME=/home \ - FUNCTIONS_WORKER_RUNTIME=node \ - DOTNET_USE_POLLING_FILE_WATCHER=true \ - HOST_VERSION=${HOST_VERSION} - -COPY --from=runtime-image [ "/azure-functions-host", "/azure-functions-host" ] -COPY --from=runtime-image [ "/workers/node", "/azure-functions-host/workers/node" ] -COPY --from=runtime-image [ "/FuncExtensionBundles", "/FuncExtensionBundles" ] - -EXPOSE 2222 80 - -RUN apt-get update && \ - apt-get install -y --no-install-recommends openssh-server dialog && \ - echo "root:Docker!" | chpasswd - -COPY sshd_config /etc/ssh/ -COPY start.sh /azure-functions-host/ - -RUN chmod +x /azure-functions-host/start.sh - -ENTRYPOINT ["/azure-functions-host/start.sh"] diff --git a/host/3.0/buster/amd64/node/node8/node8-composite.template b/host/3.0/buster/amd64/node/node8/node8-composite.template new file mode 100644 index 000000000..0a39dd92c --- /dev/null +++ b/host/3.0/buster/amd64/node/node8/node8-composite.template @@ -0,0 +1,39 @@ +FROM mcr.microsoft.com/dotnet/core/runtime-deps:3.1 +ARG HOST_VERSION + +RUN apt-get update && \ + apt-get install -y curl gnupg && \ + curl -sL https://deb.nodesource.com/setup_8.x | bash - && \ + apt-get update && \ + apt-get install -y nodejs + +# Chrome headless dependencies +# https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#chrome-headless-doesnt-launch-on-unix +RUN apt-get install -y xvfb gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 \ + libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 \ + libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 \ + libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 \ + libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget + +ENV AzureWebJobsScriptRoot=/home/site/wwwroot \ + HOME=/home \ + FUNCTIONS_WORKER_RUNTIME=node \ + DOTNET_USE_POLLING_FILE_WATCHER=true \ + HOST_VERSION=${HOST_VERSION} + +COPY --from=runtime-image [ "/azure-functions-host", "/azure-functions-host" ] +COPY --from=runtime-image [ "/workers/node", "/azure-functions-host/workers/node" ] +COPY --from=runtime-image [ "/FuncExtensionBundles", "/FuncExtensionBundles" ] + +EXPOSE 2222 80 + +RUN apt-get update && \ + apt-get install -y --no-install-recommends openssh-server dialog && \ + echo "root:Docker!" | chpasswd + +COPY sshd_config /etc/ssh/ +COPY start.sh /azure-functions-host/ + +RUN chmod +x /azure-functions-host/start.sh + +ENTRYPOINT ["/azure-functions-host/start.sh"] diff --git a/host/3.0/buster/amd64/python/python36/python36-appservice.Dockerfile b/host/3.0/buster/amd64/python/python36/python36-composite.template similarity index 53% rename from host/3.0/buster/amd64/python/python36/python36-appservice.Dockerfile rename to host/3.0/buster/amd64/python/python36/python36-composite.template index 24bc504fa..296a775b9 100644 --- a/host/3.0/buster/amd64/python/python36/python36-appservice.Dockerfile +++ b/host/3.0/buster/amd64/python/python36/python36-composite.template @@ -1,40 +1,3 @@ -# Build the runtime from source -ARG HOST_VERSION=3.3.1 -FROM mcr.microsoft.com/dotnet/sdk:5.0 AS runtime-image -ARG HOST_VERSION - -ENV PublishWithAspNetCoreTargetManifest=false - -RUN BUILD_NUMBER=$(echo ${HOST_VERSION} | cut -d'.' -f 3) && \ - git clone --branch v${HOST_VERSION} https://github.com/Azure/azure-functions-host /src/azure-functions-host && \ - cd /src/azure-functions-host && \ - HOST_COMMIT=$(git rev-list -1 HEAD) && \ - dotnet publish -v q /p:BuildNumber=$BUILD_NUMBER /p:CommitHash=$HOST_COMMIT src/WebJobs.Script.WebHost/WebJobs.Script.WebHost.csproj -c Release --output /azure-functions-host --runtime linux-x64 && \ - mv /azure-functions-host/workers /workers && mkdir /azure-functions-host/workers && \ - rm -rf /root/.local /root/.nuget /src - -RUN EXTENSION_BUNDLE_VERSION=1.8.1 && \ - EXTENSION_BUNDLE_FILENAME=Microsoft.Azure.Functions.ExtensionBundle.1.8.1_linux-x64.zip && \ - apt-get update && \ - apt-get install -y gnupg wget unzip && \ - wget https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION/$EXTENSION_BUNDLE_FILENAME && \ - mkdir -p /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION && \ - unzip /$EXTENSION_BUNDLE_FILENAME -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION && \ - rm -f /$EXTENSION_BUNDLE_FILENAME && \ - EXTENSION_BUNDLE_VERSION_V2=2.8.3 && \ - EXTENSION_BUNDLE_FILENAME_V2=Microsoft.Azure.Functions.ExtensionBundle.${EXTENSION_BUNDLE_VERSION_V2}_linux-x64.zip && \ - wget https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2/$EXTENSION_BUNDLE_FILENAME_V2 && \ - mkdir -p /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2 && \ - unzip /$EXTENSION_BUNDLE_FILENAME_V2 -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2 && \ - rm -f /$EXTENSION_BUNDLE_FILENAME_V2 &&\ - EXTENSION_BUNDLE_VERSION_V3=3.0.0 && \ - EXTENSION_BUNDLE_FILENAME_V3=Microsoft.Azure.Functions.ExtensionBundle.${EXTENSION_BUNDLE_VERSION_V3}_linux-x64.zip && \ - wget https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3/$EXTENSION_BUNDLE_FILENAME_V3 && \ - mkdir -p /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3 && \ - unzip /$EXTENSION_BUNDLE_FILENAME_V3 -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3 && \ - rm -f /$EXTENSION_BUNDLE_FILENAME_V3 &&\ - find /FuncExtensionBundles/ -type f -exec chmod 644 {} \; - FROM python:3.6-slim-buster ARG HOST_VERSION diff --git a/host/3.0/buster/amd64/python/python37/python37-appservice.Dockerfile b/host/3.0/buster/amd64/python/python37/python37-composite.template similarity index 53% rename from host/3.0/buster/amd64/python/python37/python37-appservice.Dockerfile rename to host/3.0/buster/amd64/python/python37/python37-composite.template index 530585ed3..483b80beb 100644 --- a/host/3.0/buster/amd64/python/python37/python37-appservice.Dockerfile +++ b/host/3.0/buster/amd64/python/python37/python37-composite.template @@ -1,40 +1,3 @@ -# Build the runtime from source -ARG HOST_VERSION=3.3.1 -FROM mcr.microsoft.com/dotnet/sdk:5.0 AS runtime-image -ARG HOST_VERSION - -ENV PublishWithAspNetCoreTargetManifest=false - -RUN BUILD_NUMBER=$(echo ${HOST_VERSION} | cut -d'.' -f 3) && \ - git clone --branch v${HOST_VERSION} https://github.com/Azure/azure-functions-host /src/azure-functions-host && \ - cd /src/azure-functions-host && \ - HOST_COMMIT=$(git rev-list -1 HEAD) && \ - dotnet publish -v q /p:BuildNumber=$BUILD_NUMBER /p:CommitHash=$HOST_COMMIT src/WebJobs.Script.WebHost/WebJobs.Script.WebHost.csproj -c Release --output /azure-functions-host --runtime linux-x64 && \ - mv /azure-functions-host/workers /workers && mkdir /azure-functions-host/workers && \ - rm -rf /root/.local /root/.nuget /src - -RUN EXTENSION_BUNDLE_VERSION=1.8.1 && \ - EXTENSION_BUNDLE_FILENAME=Microsoft.Azure.Functions.ExtensionBundle.1.8.1_linux-x64.zip && \ - apt-get update && \ - apt-get install -y gnupg wget unzip && \ - wget https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION/$EXTENSION_BUNDLE_FILENAME && \ - mkdir -p /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION && \ - unzip /$EXTENSION_BUNDLE_FILENAME -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION && \ - rm -f /$EXTENSION_BUNDLE_FILENAME && \ - EXTENSION_BUNDLE_VERSION_V2=2.8.3 && \ - EXTENSION_BUNDLE_FILENAME_V2=Microsoft.Azure.Functions.ExtensionBundle.${EXTENSION_BUNDLE_VERSION_V2}_linux-x64.zip && \ - wget https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2/$EXTENSION_BUNDLE_FILENAME_V2 && \ - mkdir -p /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2 && \ - unzip /$EXTENSION_BUNDLE_FILENAME_V2 -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2 && \ - rm -f /$EXTENSION_BUNDLE_FILENAME_V2 &&\ - EXTENSION_BUNDLE_VERSION_V3=3.0.0 && \ - EXTENSION_BUNDLE_FILENAME_V3=Microsoft.Azure.Functions.ExtensionBundle.${EXTENSION_BUNDLE_VERSION_V3}_linux-x64.zip && \ - wget https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3/$EXTENSION_BUNDLE_FILENAME_V3 && \ - mkdir -p /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3 && \ - unzip /$EXTENSION_BUNDLE_FILENAME_V3 -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3 && \ - rm -f /$EXTENSION_BUNDLE_FILENAME_V3 &&\ - find /FuncExtensionBundles/ -type f -exec chmod 644 {} \; - FROM python:3.7-slim-buster ARG HOST_VERSION diff --git a/host/3.0/buster/amd64/python/python38/python38-appservice.Dockerfile b/host/3.0/buster/amd64/python/python38/python38-composite.template similarity index 53% rename from host/3.0/buster/amd64/python/python38/python38-appservice.Dockerfile rename to host/3.0/buster/amd64/python/python38/python38-composite.template index 604fd10b5..c1f353d53 100644 --- a/host/3.0/buster/amd64/python/python38/python38-appservice.Dockerfile +++ b/host/3.0/buster/amd64/python/python38/python38-composite.template @@ -1,40 +1,3 @@ -# Build the runtime from source -ARG HOST_VERSION=3.3.1 -FROM mcr.microsoft.com/dotnet/sdk:5.0 AS runtime-image -ARG HOST_VERSION - -ENV PublishWithAspNetCoreTargetManifest=false - -RUN BUILD_NUMBER=$(echo ${HOST_VERSION} | cut -d'.' -f 3) && \ - git clone --branch v${HOST_VERSION} https://github.com/Azure/azure-functions-host /src/azure-functions-host && \ - cd /src/azure-functions-host && \ - HOST_COMMIT=$(git rev-list -1 HEAD) && \ - dotnet publish -v q /p:BuildNumber=$BUILD_NUMBER /p:CommitHash=$HOST_COMMIT src/WebJobs.Script.WebHost/WebJobs.Script.WebHost.csproj -c Release --output /azure-functions-host --runtime linux-x64 && \ - mv /azure-functions-host/workers /workers && mkdir /azure-functions-host/workers && \ - rm -rf /root/.local /root/.nuget /src - -RUN EXTENSION_BUNDLE_VERSION=1.8.1 && \ - EXTENSION_BUNDLE_FILENAME=Microsoft.Azure.Functions.ExtensionBundle.1.8.1_linux-x64.zip && \ - apt-get update && \ - apt-get install -y gnupg wget unzip && \ - wget https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION/$EXTENSION_BUNDLE_FILENAME && \ - mkdir -p /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION && \ - unzip /$EXTENSION_BUNDLE_FILENAME -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION && \ - rm -f /$EXTENSION_BUNDLE_FILENAME && \ - EXTENSION_BUNDLE_VERSION_V2=2.8.3 && \ - EXTENSION_BUNDLE_FILENAME_V2=Microsoft.Azure.Functions.ExtensionBundle.${EXTENSION_BUNDLE_VERSION_V2}_linux-x64.zip && \ - wget https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2/$EXTENSION_BUNDLE_FILENAME_V2 && \ - mkdir -p /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2 && \ - unzip /$EXTENSION_BUNDLE_FILENAME_V2 -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2 && \ - rm -f /$EXTENSION_BUNDLE_FILENAME_V2 &&\ - EXTENSION_BUNDLE_VERSION_V3=3.0.0 && \ - EXTENSION_BUNDLE_FILENAME_V3=Microsoft.Azure.Functions.ExtensionBundle.${EXTENSION_BUNDLE_VERSION_V3}_linux-x64.zip && \ - wget https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3/$EXTENSION_BUNDLE_FILENAME_V3 && \ - mkdir -p /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3 && \ - unzip /$EXTENSION_BUNDLE_FILENAME_V3 -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3 && \ - rm -f /$EXTENSION_BUNDLE_FILENAME_V3 &&\ - find /FuncExtensionBundles/ -type f -exec chmod 644 {} \; - FROM python:3.8-slim-buster ARG HOST_VERSION diff --git a/host/3.0/buster/amd64/python/python39/python39-appservice.Dockerfile b/host/3.0/buster/amd64/python/python39/python39-composite.template similarity index 53% rename from host/3.0/buster/amd64/python/python39/python39-appservice.Dockerfile rename to host/3.0/buster/amd64/python/python39/python39-composite.template index f16dca24c..7e4f35634 100644 --- a/host/3.0/buster/amd64/python/python39/python39-appservice.Dockerfile +++ b/host/3.0/buster/amd64/python/python39/python39-composite.template @@ -1,40 +1,3 @@ -# Build the runtime from source -ARG HOST_VERSION=3.3.1 -FROM mcr.microsoft.com/dotnet/sdk:5.0 AS runtime-image -ARG HOST_VERSION - -ENV PublishWithAspNetCoreTargetManifest=false - -RUN BUILD_NUMBER=$(echo ${HOST_VERSION} | cut -d'.' -f 3) && \ - git clone --branch v${HOST_VERSION} https://github.com/Azure/azure-functions-host /src/azure-functions-host && \ - cd /src/azure-functions-host && \ - HOST_COMMIT=$(git rev-list -1 HEAD) && \ - dotnet publish -v q /p:BuildNumber=$BUILD_NUMBER /p:CommitHash=$HOST_COMMIT src/WebJobs.Script.WebHost/WebJobs.Script.WebHost.csproj -c Release --output /azure-functions-host --runtime linux-x64 && \ - mv /azure-functions-host/workers /workers && mkdir /azure-functions-host/workers && \ - rm -rf /root/.local /root/.nuget /src - -RUN EXTENSION_BUNDLE_VERSION=1.8.1 && \ - EXTENSION_BUNDLE_FILENAME=Microsoft.Azure.Functions.ExtensionBundle.1.8.1_linux-x64.zip && \ - apt-get update && \ - apt-get install -y gnupg wget unzip && \ - wget https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION/$EXTENSION_BUNDLE_FILENAME && \ - mkdir -p /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION && \ - unzip /$EXTENSION_BUNDLE_FILENAME -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION && \ - rm -f /$EXTENSION_BUNDLE_FILENAME && \ - EXTENSION_BUNDLE_VERSION_V2=2.8.3 && \ - EXTENSION_BUNDLE_FILENAME_V2=Microsoft.Azure.Functions.ExtensionBundle.${EXTENSION_BUNDLE_VERSION_V2}_linux-x64.zip && \ - wget https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2/$EXTENSION_BUNDLE_FILENAME_V2 && \ - mkdir -p /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2 && \ - unzip /$EXTENSION_BUNDLE_FILENAME_V2 -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2 && \ - rm -f /$EXTENSION_BUNDLE_FILENAME_V2 &&\ - EXTENSION_BUNDLE_VERSION_V3=3.0.0 && \ - EXTENSION_BUNDLE_FILENAME_V3=Microsoft.Azure.Functions.ExtensionBundle.${EXTENSION_BUNDLE_VERSION_V3}_linux-x64.zip && \ - wget https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3/$EXTENSION_BUNDLE_FILENAME_V3 && \ - mkdir -p /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3 && \ - unzip /$EXTENSION_BUNDLE_FILENAME_V3 -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3 && \ - rm -f /$EXTENSION_BUNDLE_FILENAME_V3 &&\ - find /FuncExtensionBundles/ -type f -exec chmod 644 {} \; - FROM python:3.9-slim-buster ARG HOST_VERSION diff --git a/host/3.0/node-build.yml b/host/3.0/node-build.yml index 2ee20cb6e..1423f120b 100644 --- a/host/3.0/node-build.yml +++ b/host/3.0/node-build.yml @@ -8,6 +8,7 @@ pr: - release/3.x paths: include: + - host/3.0/buster/amd64/base/* - host/3.0/buster/amd64/node/* trigger: @@ -18,6 +19,7 @@ trigger: - release/3.x paths: include: + - host/3.0/buster/amd64/base/* - host/3.0/buster/amd64/node/* steps: @@ -31,13 +33,19 @@ steps: env: pswd: $(dockerPassword) + - bash: | + ./host/3.0/buster/amd64/base/generate-composite.sh node + + displayName: create node-appservice dockerfiles + continueOnError: false + - bash: | set -e IMAGE_NAME=azurefunctions.azurecr.io/azure-functions/3.0/node:$(Build.SourceBranchName)-node8-appservice docker build -t $IMAGE_NAME \ - -f host/3.0/buster/amd64/node/node8/node8-appservice.Dockerfile \ - host/3.0/buster/amd64/node/node8/ + -f host/3.0/buster/amd64/out/node/node8-appservice.Dockerfile \ + host/3.0/buster/amd64/out/node/ npm run test $IMAGE_NAME --prefix test/ docker push $IMAGE_NAME displayName: node8-appservice @@ -72,8 +80,8 @@ steps: IMAGE_NAME=azurefunctions.azurecr.io/azure-functions/3.0/node:$(Build.SourceBranchName)-node10-appservice docker build -t $IMAGE_NAME \ - -f host/3.0/buster/amd64/node/node10/node10-appservice.Dockerfile \ - host/3.0/buster/amd64/node/node10/ + -f host/3.0/buster/amd64/out/node/node10-appservice.Dockerfile \ + host/3.0/buster/amd64/out/node/ npm run test $IMAGE_NAME --prefix test/ docker push $IMAGE_NAME displayName: node10-appservice @@ -108,8 +116,8 @@ steps: IMAGE_NAME=azurefunctions.azurecr.io/azure-functions/3.0/node:$(Build.SourceBranchName)-node12-appservice docker build -t $IMAGE_NAME \ - -f host/3.0/buster/amd64/node/node12/node12-appservice.Dockerfile \ - host/3.0/buster/amd64/node/node12/ + -f host/3.0/buster/amd64/out/node/node12-appservice.Dockerfile \ + host/3.0/buster/amd64/out/node/ npm run test $IMAGE_NAME --prefix test/ docker push $IMAGE_NAME displayName: node12-appservice @@ -144,8 +152,8 @@ steps: IMAGE_NAME=azurefunctions.azurecr.io/azure-functions/3.0/node:$(Build.SourceBranchName)-node14-appservice docker build -t $IMAGE_NAME \ - -f host/3.0/buster/amd64/node/node14/node14-appservice.Dockerfile \ - host/3.0/buster/amd64/node/node14/ + -f host/3.0/buster/amd64/out/node/node14-appservice.Dockerfile \ + host/3.0/buster/amd64/out/node/ npm run test $IMAGE_NAME --prefix test/ docker push $IMAGE_NAME displayName: node14-appservice diff --git a/host/3.0/python-build.yml b/host/3.0/python-build.yml index 3511d4d78..e88face4e 100644 --- a/host/3.0/python-build.yml +++ b/host/3.0/python-build.yml @@ -8,6 +8,7 @@ pr: - release/3.x paths: include: + - host/3.0/buster/amd64/base/* - host/3.0/buster/amd64/python/* trigger: @@ -18,13 +19,14 @@ trigger: - release/3.x paths: include: + - host/3.0/buster/amd64/base/* - host/3.0/buster/amd64/python/* jobs: - job: python36 displayName: python 3.6 pool: - vmImage: ubuntu-18.04 + vmImage: ubuntu-latest steps: - bash: | # login @@ -35,6 +37,13 @@ jobs: continueOnError: false env: pswd: $(dockerPassword) + + - bash: | + ./host/3.0/buster/amd64/base/generate-composite.sh python + + displayName: create python-appservice dockerfiles + continueOnError: false + - bash: | set -e IMAGE_NAME=azurefunctions.azurecr.io/azure-functions/3.0/python:$(Build.SourceBranchName)-python3.6 @@ -68,8 +77,8 @@ jobs: IMAGE_NAME=azurefunctions.azurecr.io/azure-functions/3.0/python:$(Build.SourceBranchName)-python3.6-appservice docker build -t $IMAGE_NAME \ - -f host/3.0/buster/amd64/python/python36/python36-appservice.Dockerfile \ - host/3.0/buster/amd64/python/python36/ + -f host/3.0/buster/amd64/out/python/python36-appservice.Dockerfile \ + host/3.0/buster/amd64/out/python/ npm run test $IMAGE_NAME --prefix test/ docker push $IMAGE_NAME displayName: python3.6-appservice @@ -93,7 +102,7 @@ jobs: - job: python37 displayName: python 3.7 pool: - vmImage: ubuntu-18.04 + vmImage: ubuntu-latest steps: - bash: | # login @@ -105,6 +114,12 @@ jobs: env: pswd: $(dockerPassword) + - bash: | + ./host/3.0/buster/amd64/base/generate-composite.sh python + + displayName: create python-appservice dockerfiles + continueOnError: false + - bash: | set -e IMAGE_NAME=azurefunctions.azurecr.io/azure-functions/3.0/python:$(Build.SourceBranchName)-python3.7 @@ -138,8 +153,8 @@ jobs: IMAGE_NAME=azurefunctions.azurecr.io/azure-functions/3.0/python:$(Build.SourceBranchName)-python3.7-appservice docker build -t $IMAGE_NAME \ - -f host/3.0/buster/amd64/python/python37/python37-appservice.Dockerfile \ - host/3.0/buster/amd64/python/python37/ + -f host/3.0/buster/amd64/out/python/python37-appservice.Dockerfile \ + host/3.0/buster/amd64/out/python/ npm run test $IMAGE_NAME --prefix test/ docker push $IMAGE_NAME displayName: python3.7-appservice @@ -163,7 +178,7 @@ jobs: - job: python38 displayName: python 3.8 pool: - vmImage: ubuntu-18.04 + vmImage: ubuntu-latest steps: - bash: | # login @@ -175,6 +190,12 @@ jobs: env: pswd: $(dockerPassword) + - bash: | + ./host/3.0/buster/amd64/base/generate-composite.sh python + + displayName: create python-appservice dockerfiles + continueOnError: false + - bash: | set -e IMAGE_NAME=azurefunctions.azurecr.io/azure-functions/3.0/python:$(Build.SourceBranchName)-python3.8 @@ -208,8 +229,8 @@ jobs: IMAGE_NAME=azurefunctions.azurecr.io/azure-functions/3.0/python:$(Build.SourceBranchName)-python3.8-appservice docker build -t $IMAGE_NAME \ - -f host/3.0/buster/amd64/python/python38/python38-appservice.Dockerfile \ - host/3.0/buster/amd64/python/python38/ + -f host/3.0/buster/amd64/out/python/python38-appservice.Dockerfile \ + host/3.0/buster/amd64/out/python/ npm run test $IMAGE_NAME --prefix test/ docker push $IMAGE_NAME displayName: python3.8-appservice @@ -233,7 +254,7 @@ jobs: - job: python39 displayName: python 3.9 pool: - vmImage: ubuntu-18.04 + vmImage: ubuntu-latest steps: - bash: | # login @@ -245,6 +266,12 @@ jobs: env: pswd: $(dockerPassword) + - bash: | + ./host/3.0/buster/amd64/base/generate-composite.sh python + + displayName: create python-appservice dockerfiles + continueOnError: false + - bash: | set -e IMAGE_NAME=azurefunctions.azurecr.io/azure-functions/3.0/python:$(Build.SourceBranchName)-python3.9 @@ -278,8 +305,8 @@ jobs: IMAGE_NAME=azurefunctions.azurecr.io/azure-functions/3.0/python:$(Build.SourceBranchName)-python3.9-appservice docker build -t $IMAGE_NAME \ - -f host/3.0/buster/amd64/python/python39/python39-appservice.Dockerfile \ - host/3.0/buster/amd64/python/python39/ + -f host/3.0/buster/amd64/out/python/python39-appservice.Dockerfile \ + host/3.0/buster/amd64/out/python/ npm run test $IMAGE_NAME --prefix test/ docker push $IMAGE_NAME displayName: python3.9-appservice