diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 18750f7de..336f30dfb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,7 +18,7 @@ jobs: ref: dev fetch-depth: 0 token: ${{ secrets.PIPELINE_ADMIN }} - - name: Generate Image Artifacts + - name: Create Release Tag id: createBranch run: | set -e @@ -27,8 +27,6 @@ jobs: git fetch --all git checkout -b ${{ github.event.inputs.targetBranch }} origin/${{ github.event.inputs.targetBranch }} git merge dev - ./host/3.0/buster/amd64/base/generate-composite.sh -r all - zip -r version3images.zip ./host/3.0/buster/amd64/release/ git tag ${{ github.event.inputs.version }} git push git push origin ${{ github.event.inputs.version }} @@ -41,11 +39,22 @@ jobs: tag: ${{ github.event.inputs.version }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Attach v3 Assets to Release + - name : Generate v3 Assets + if : startsWith(github.event.inputs.version, '3') + run: | + ./host/generate-composite.sh -3 -r all + zip -r ${{ github.event.inputs.version }}.zip ./host/3.0/buster/amd64/release/ + - name : Generate v4 Assets + if : startsWith(github.event.inputs.version, '4') + run: | + ./host/generate-composite.sh -4 -r all + zip -r ${{ github.event.inputs.version }}.zip ./host/4/bullseye/amd64/release/ + - name: Attach Assets to Release uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.release.outputs.upload_url }} - asset_path: ./version3images.zip - asset_name: version3images \ No newline at end of file + asset_path: ./${{ github.event.inputs.version }}.zip + asset_name: ${{ github.event.inputs.version }}-appservice.zip + asset_content_type: application/zip \ No newline at end of file diff --git a/host/3.0/buster/amd64/base/host.Dockerfile b/host/3.0/buster/amd64/base/host.Dockerfile index 8f9538f20..23b8478d4 100755 --- a/host/3.0/buster/amd64/base/host.Dockerfile +++ b/host/3.0/buster/amd64/base/host.Dockerfile @@ -4,8 +4,8 @@ ARG HOST_VERSION=3.4.1 FROM mcr.microsoft.com/dotnet/sdk:5.0 AS runtime-image ARG HOST_VERSION -ENV PublishWithAspNetCoreTargetManifest=false -ENV DEBIAN_FRONTEND=noninteractive +ENV PublishWithAspNetCoreTargetManifest=false \ + DEBIAN_FRONTEND=noninteractive RUN BUILD_NUMBER=$(echo ${HOST_VERSION} | cut -d'.' -f 3) && \ git clone --branch v${HOST_VERSION} https://github.com/Azure/azure-functions-host.git /src/azure-functions-host && \ diff --git a/host/3.0/buster/amd64/dotnet/dotnet-inproc/dotnet-appservice.Dockerfile b/host/3.0/buster/amd64/dotnet/dotnet-inproc/dotnet-appservice.Dockerfile deleted file mode 100644 index 4e19e8340..000000000 --- a/host/3.0/buster/amd64/dotnet/dotnet-inproc/dotnet-appservice.Dockerfile +++ /dev/null @@ -1,71 +0,0 @@ -# Build the runtime from source -ARG HOST_VERSION=3.4.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 mcr.microsoft.com/dotnet/core/runtime-deps:3.1 -ARG HOST_VERSION - -ENV AzureWebJobsScriptRoot=/home/site/wwwroot \ - HOME=/home \ - FUNCTIONS_WORKER_RUNTIME=dotnet \ - DOTNET_USE_POLLING_FILE_WATCHER=true \ - HOST_VERSION=${HOST_VERSION} - -COPY --from=runtime-image [ "/azure-functions-host", "/azure-functions-host" ] -COPY --from=runtime-image [ "/FuncExtensionBundles", "/FuncExtensionBundles" ] - -EXPOSE 2222 80 - -RUN apt-get update && \ - apt-get install -y --no-install-recommends gnupg wget unzip curl dialog openssh-server && \ - # Add remote dotnet debugger - curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -v vs2017u5 -l /root/vsdbg && \ - echo "root:Docker!" | chpasswd - -# 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 - -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/dotnet/dotnet-inproc/dotnet-composite.template b/host/3.0/buster/amd64/dotnet/dotnet-inproc/dotnet-composite.template new file mode 100644 index 000000000..6655b27d1 --- /dev/null +++ b/host/3.0/buster/amd64/dotnet/dotnet-inproc/dotnet-composite.template @@ -0,0 +1,34 @@ +FROM mcr.microsoft.com/dotnet/core/runtime-deps:3.1 +ARG HOST_VERSION + +ENV AzureWebJobsScriptRoot=/home/site/wwwroot \ + HOME=/home \ + FUNCTIONS_WORKER_RUNTIME=dotnet \ + DOTNET_USE_POLLING_FILE_WATCHER=true \ + HOST_VERSION=${HOST_VERSION} + +COPY --from=runtime-image [ "/azure-functions-host", "/azure-functions-host" ] +COPY --from=runtime-image [ "/FuncExtensionBundles", "/FuncExtensionBundles" ] + +EXPOSE 2222 80 + +RUN apt-get update && \ + apt-get install -y --no-install-recommends gnupg wget unzip curl dialog openssh-server && \ + # Add remote dotnet debugger + curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -v vs2017u5 -l /root/vsdbg && \ + echo "root:Docker!" | chpasswd + +# 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 + +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"] \ No newline at end of file diff --git a/host/3.0/buster/amd64/dotnet/dotnet-isolated/dotnet-isolated-composite.template b/host/3.0/buster/amd64/dotnet/dotnet-isolated/dotnet-isolated-composite.template new file mode 100644 index 000000000..b066e2556 --- /dev/null +++ b/host/3.0/buster/amd64/dotnet/dotnet-isolated/dotnet-isolated-composite.template @@ -0,0 +1,34 @@ +FROM mcr.microsoft.com/dotnet/runtime:5.0 +ARG HOST_VERSION + +ENV AzureWebJobsScriptRoot=/home/site/wwwroot \ + HOME=/home \ + FUNCTIONS_WORKER_RUNTIME=dotnet-isolated \ + DOTNET_USE_POLLING_FILE_WATCHER=true \ + HOST_VERSION=${HOST_VERSION} + +COPY --from=runtime-image [ "/azure-functions-host", "/azure-functions-host" ] +COPY --from=runtime-image [ "/FuncExtensionBundles", "/FuncExtensionBundles" ] + +EXPOSE 2222 80 + +RUN apt-get update && \ + apt-get install -y --no-install-recommends gnupg wget unzip curl dialog openssh-server && \ + # Add remote dotnet debugger + curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -v vs2017u5 -l /root/vsdbg && \ + echo "root:Docker!" | chpasswd + +# 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 + +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/dotnet-build.yml b/host/3.0/dotnet-build.yml index be9db793e..8c28a3767 100644 --- a/host/3.0/dotnet-build.yml +++ b/host/3.0/dotnet-build.yml @@ -35,6 +35,12 @@ steps: continueOnError: false env: pswd: $(dockerPassword) + + - bash: | + ./host/generate-composite.sh -3 dotnet + + displayName: create dotnet-appservice dockerfiles + continueOnError: false - bash: | set -e @@ -65,8 +71,8 @@ steps: IMAGE_NAME=azurefunctions.azurecr.io/azure-functions/3.0/dotnet:$(Build.SourceBranchName)-appservice docker build -t $IMAGE_NAME \ - -f host/3.0/buster/amd64/dotnet/dotnet-inproc/dotnet-appservice.Dockerfile \ - host/3.0/buster/amd64/dotnet/dotnet-inproc/ + -f host/3.0/buster/amd64/out/dotnet/dotnet-inproc-appservice.Dockerfile \ + host/3.0/buster/amd64/out/dotnet/ npm run test $IMAGE_NAME --prefix test/ docker push $IMAGE_NAME displayName: dotnet-appservice @@ -102,8 +108,8 @@ steps: IMAGE_NAME=azurefunctions.azurecr.io/azure-functions/3.0/dotnet-isolated:$(Build.SourceBranchName)-dotnet-isolated5.0-appservice docker build -t $IMAGE_NAME \ - -f host/3.0/buster/amd64/dotnet/dotnet-isolated/dotnet-isolated-appservice.Dockerfile \ - host/3.0/buster/amd64/dotnet/dotnet-isolated/ + -f host/3.0/buster/amd64/out/dotnet/dotnet-isolated-appservice.Dockerfile \ + host/3.0/buster/amd64/out/dotnet/ npm run test $IMAGE_NAME --prefix test/ docker push $IMAGE_NAME displayName: dotnet-isolated-appservice (.NET 5) diff --git a/host/3.0/java-build.yml b/host/3.0/java-build.yml index 5d348f9bb..313c3a6ac 100644 --- a/host/3.0/java-build.yml +++ b/host/3.0/java-build.yml @@ -36,7 +36,7 @@ steps: pswd: $(dockerPassword) - bash: | - ./host/3.0/buster/amd64/base/generate-composite.sh java + ./host/generate-composite.sh -3 java displayName: create java-appservice dockerfiles continueOnError: false diff --git a/host/3.0/node-build.yml b/host/3.0/node-build.yml index 1423f120b..752b19494 100644 --- a/host/3.0/node-build.yml +++ b/host/3.0/node-build.yml @@ -34,7 +34,7 @@ steps: pswd: $(dockerPassword) - bash: | - ./host/3.0/buster/amd64/base/generate-composite.sh node + ./host/generate-composite.sh -3 node displayName: create node-appservice dockerfiles continueOnError: false diff --git a/host/3.0/python-build.yml b/host/3.0/python-build.yml index e88face4e..0e386d2cc 100644 --- a/host/3.0/python-build.yml +++ b/host/3.0/python-build.yml @@ -39,7 +39,7 @@ jobs: pswd: $(dockerPassword) - bash: | - ./host/3.0/buster/amd64/base/generate-composite.sh python + ./host/generate-composite.sh -3 python displayName: create python-appservice dockerfiles continueOnError: false @@ -115,7 +115,7 @@ jobs: pswd: $(dockerPassword) - bash: | - ./host/3.0/buster/amd64/base/generate-composite.sh python + ./host/generate-composite.sh -3 python displayName: create python-appservice dockerfiles continueOnError: false @@ -191,7 +191,7 @@ jobs: pswd: $(dockerPassword) - bash: | - ./host/3.0/buster/amd64/base/generate-composite.sh python + ./host/generate-composite.sh -3 python displayName: create python-appservice dockerfiles continueOnError: false @@ -267,7 +267,7 @@ jobs: pswd: $(dockerPassword) - bash: | - ./host/3.0/buster/amd64/base/generate-composite.sh python + ./host/generate-composite.sh -3 python displayName: create python-appservice dockerfiles continueOnError: false diff --git a/host/4/bullseye/amd64/java/java8/java8-appservice.Dockerfile b/host/4/bullseye/amd64/base/host.Dockerfile similarity index 53% rename from host/4/bullseye/amd64/java/java8/java8-appservice.Dockerfile rename to host/4/bullseye/amd64/base/host.Dockerfile index a63fd1ec9..f1ca2f884 100644 --- a/host/4/bullseye/amd64/java/java8/java8-appservice.Dockerfile +++ b/host/4/bullseye/amd64/base/host.Dockerfile @@ -1,11 +1,10 @@ -# Build the runtime from source ARG HOST_VERSION=4.0.1.16815 -ARG JAVA_VERSION=8u292 + FROM mcr.microsoft.com/dotnet/sdk:6.0.100-rc.2 AS runtime-image ARG HOST_VERSION -ENV PublishWithAspNetCoreTargetManifest=false -RUN echo "HOST_VARSION: "${HOST_VERSION} +ENV PublishWithAspNetCoreTargetManifest=false \ + DEBIAN_FRONTEND=noninteractive RUN BUILD_NUMBER=$(echo ${HOST_VERSION} | cut -d'.' -f 4) && \ git clone --branch v${HOST_VERSION} https://github.com/Azure/azure-functions-host /src/azure-functions-host && \ @@ -13,17 +12,10 @@ RUN BUILD_NUMBER=$(echo ${HOST_VERSION} | cut -d'.' -f 4) && \ 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 \; -RUN EXTENSION_BUNDLE_VERSION=1.8.1 && \ - EXTENSION_BUNDLE_FILENAME=Microsoft.Azure.Functions.ExtensionBundle.1.8.1_linux-x64.zip && \ - apt-get update && \ +RUN 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 && \ - find /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION/bin/runtimes/ -mindepth 1 -type d -not -name "linux-x64" -prune -exec rm -rf {} + && \ 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 && \ @@ -40,35 +32,3 @@ RUN EXTENSION_BUNDLE_VERSION=1.8.1 && \ find /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3/bin/runtimes/ -mindepth 1 -type d -not -name "linux-x64" -prune -exec rm -rf {} + && \ find /FuncExtensionBundles/ -type f -exec chmod 644 {} \; -FROM mcr.microsoft.com/java/jre-headless:${JAVA_VERSION}-zulu-debian10-with-tools as jre -FROM mcr.microsoft.com/dotnet/nightly/runtime-deps:6.0.0 -ARG HOST_VERSION - -EXPOSE 2222 80 - -ENV AzureWebJobsScriptRoot=/home/site/wwwroot \ - HOME=/home \ - FUNCTIONS_WORKER_RUNTIME=java \ - DOTNET_USE_POLLING_FILE_WATCHER=true \ - HOST_VERSION=${HOST_VERSION} - -# Fix from https://github.com/GoogleCloudPlatform/google-cloud-dotnet-powerpack/issues/22#issuecomment-729895157 -RUN apt-get update && \ - apt-get install -y libc-dev - -COPY --from=runtime-image [ "/azure-functions-host", "/azure-functions-host" ] -COPY --from=runtime-image [ "/workers/java", "/azure-functions-host/workers/java" ] -COPY --from=jre [ "/usr/lib/jvm/zre-hl-8-azure-amd64", "/usr/lib/jvm/zre-8-azure-amd64" ] -COPY sshd_config /etc/ssh/ -COPY start.sh /azure-functions-host/ -COPY --from=runtime-image [ "/FuncExtensionBundles", "/FuncExtensionBundles" ] - -ENV JAVA_HOME /usr/lib/jvm/zre-8-azure-amd64 - -RUN apt-get update && \ - apt-get install -y --no-install-recommends openssh-server dialog && \ - echo "root:Docker!" | chpasswd - -RUN chmod +x /azure-functions-host/start.sh - -ENTRYPOINT ["/azure-functions-host/start.sh"] diff --git a/host/4/bullseye/amd64/base/sharedconfig/sshd_config b/host/4/bullseye/amd64/base/sharedconfig/sshd_config new file mode 100644 index 000000000..11f6ff26a --- /dev/null +++ b/host/4/bullseye/amd64/base/sharedconfig/sshd_config @@ -0,0 +1,15 @@ +# This is ssh server systemwide configuration file. +# +# /etc/sshd_config + +Port SSH_PORT +ListenAddress 0.0.0.0 +LoginGraceTime 180 +X11Forwarding yes +Ciphers aes128-cbc,3des-cbc,aes256-cbc +MACs hmac-sha1,hmac-sha1-96 +StrictModes yes +SyslogFacility DAEMON +PasswordAuthentication yes +PermitEmptyPasswords no +PermitRootLogin yes \ No newline at end of file diff --git a/host/4/bullseye/amd64/base/sharedconfig/start.sh b/host/4/bullseye/amd64/base/sharedconfig/start.sh new file mode 100644 index 000000000..9c2cb317c --- /dev/null +++ b/host/4/bullseye/amd64/base/sharedconfig/start.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +export DOTNET_USE_POLLING_FILE_WATCHER=true + +if [ -z $PORT ]; then + export ASPNETCORE_URLS=http://*:80 +else + export ASPNETCORE_URLS=http://*:$PORT +fi + +if [ -z $SSH_PORT ]; then + export SSH_PORT=2222 +fi + +if [ "$APPSVC_REMOTE_DEBUGGING" == "TRUE" ]; then + export languageWorkers__node__arguments="--inspect=0.0.0.0:$APPSVC_TUNNEL_PORT" + export languageWorkers__python__arguments="-m ptvsd --host localhost --port $APPSVC_TUNNEL_PORT" +fi + +sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config + +service ssh start + +if [ -f /azure-functions-host/Microsoft.Azure.WebJobs.Script.WebHost ]; then + /azure-functions-host/Microsoft.Azure.WebJobs.Script.WebHost +else + dotnet /azure-functions-host/Microsoft.Azure.WebJobs.Script.WebHost.dll +fi \ No newline at end of file diff --git a/host/4/bullseye/amd64/dotnet/dotnet-inproc/dotnet-appservice.Dockerfile b/host/4/bullseye/amd64/dotnet/dotnet-inproc/dotnet-appservice.Dockerfile deleted file mode 100644 index 24c41a2d3..000000000 --- a/host/4/bullseye/amd64/dotnet/dotnet-inproc/dotnet-appservice.Dockerfile +++ /dev/null @@ -1,79 +0,0 @@ -# Build the runtime from source -ARG HOST_VERSION=4.0.1.16815 -FROM mcr.microsoft.com/dotnet/sdk:6.0.100-rc.2 AS runtime-image -ARG HOST_VERSION - -ENV PublishWithAspNetCoreTargetManifest=false - -RUN BUILD_NUMBER=$(echo ${HOST_VERSION} | cut -d'.' -f 4) && \ - 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 && \ - find /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION/bin/runtimes/ -mindepth 1 -type d -not -name "linux-x64" -prune -exec rm -rf {} + && \ - 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 &&\ - find /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2/bin/runtimes/ -mindepth 1 -type d -not -name "linux-x64" -prune -exec rm -rf {} + && \ - 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/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3/bin/runtimes/ -mindepth 1 -type d -not -name "linux-x64" -prune -exec rm -rf {} + && \ - find /FuncExtensionBundles/ -type f -exec chmod 644 {} \; - -FROM mcr.microsoft.com/dotnet/nightly/runtime-deps:6.0.0 -ARG HOST_VERSION - -ENV AzureWebJobsScriptRoot=/home/site/wwwroot \ - HOME=/home \ - FUNCTIONS_WORKER_RUNTIME=dotnet \ - DOTNET_USE_POLLING_FILE_WATCHER=true \ - HOST_VERSION=${HOST_VERSION} - -# Fix from https://github.com/GoogleCloudPlatform/google-cloud-dotnet-powerpack/issues/22#issuecomment-729895157 -RUN apt-get update && \ - apt-get install -y libc-dev - -COPY --from=runtime-image [ "/azure-functions-host", "/azure-functions-host" ] -COPY --from=runtime-image [ "/FuncExtensionBundles", "/FuncExtensionBundles" ] - -EXPOSE 2222 80 - -RUN apt-get update && \ - apt-get install -y --no-install-recommends gnupg wget unzip curl dialog openssh-server && \ - # Add remote dotnet debugger - curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -v vs2017u5 -l /root/vsdbg && \ - echo "root:Docker!" | chpasswd - -# This is current not working with the .NET 6.0 image based on bullseye. Tracking here: https://github.com/Azure/azure-functions-docker/issues/451 -# 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 - -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/4/bullseye/amd64/dotnet/dotnet-inproc/dotnet-composite.template b/host/4/bullseye/amd64/dotnet/dotnet-inproc/dotnet-composite.template new file mode 100644 index 000000000..ef71b825e --- /dev/null +++ b/host/4/bullseye/amd64/dotnet/dotnet-inproc/dotnet-composite.template @@ -0,0 +1,39 @@ +FROM mcr.microsoft.com/dotnet/nightly/runtime-deps:6.0.0 +ARG HOST_VERSION + +ENV AzureWebJobsScriptRoot=/home/site/wwwroot \ + HOME=/home \ + FUNCTIONS_WORKER_RUNTIME=dotnet \ + DOTNET_USE_POLLING_FILE_WATCHER=true \ + HOST_VERSION=${HOST_VERSION} + +# Fix from https://github.com/GoogleCloudPlatform/google-cloud-dotnet-powerpack/issues/22#issuecomment-729895157 +RUN apt-get update && \ + apt-get install -y libc-dev + +COPY --from=runtime-image [ "/azure-functions-host", "/azure-functions-host" ] +COPY --from=runtime-image [ "/FuncExtensionBundles", "/FuncExtensionBundles" ] + +EXPOSE 2222 80 + +RUN apt-get update && \ + apt-get install -y --no-install-recommends gnupg wget unzip curl dialog openssh-server && \ + # Add remote dotnet debugger + curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -v vs2017u5 -l /root/vsdbg && \ + echo "root:Docker!" | chpasswd + +# This is current not working with the .NET 6.0 image based on bullseye. Tracking here: https://github.com/Azure/azure-functions-docker/issues/451 +# 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 + +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/4/bullseye/amd64/dotnet/dotnet-isolated/dotnet-isolated-appservice.Dockerfile b/host/4/bullseye/amd64/dotnet/dotnet-isolated/dotnet-isolated-appservice.Dockerfile deleted file mode 100644 index cbde7ee37..000000000 --- a/host/4/bullseye/amd64/dotnet/dotnet-isolated/dotnet-isolated-appservice.Dockerfile +++ /dev/null @@ -1,79 +0,0 @@ -# Build the runtime from source -ARG HOST_VERSION=4.0.1.16815 -FROM mcr.microsoft.com/dotnet/sdk:6.0.100-rc.2 AS runtime-image -ARG HOST_VERSION - -ENV PublishWithAspNetCoreTargetManifest=false - -RUN BUILD_NUMBER=$(echo ${HOST_VERSION} | cut -d'.' -f 4) && \ - 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 && \ - find /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION/bin/runtimes/ -mindepth 1 -type d -not -name "linux-x64" -prune -exec rm -rf {} + && \ - 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 &&\ - find /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2/bin/runtimes/ -mindepth 1 -type d -not -name "linux-x64" -prune -exec rm -rf {} + && \ - 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/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3/bin/runtimes/ -mindepth 1 -type d -not -name "linux-x64" -prune -exec rm -rf {} + && \ - find /FuncExtensionBundles/ -type f -exec chmod 644 {} \; - -FROM mcr.microsoft.com/dotnet/nightly/runtime:6.0.0 -ARG HOST_VERSION - -ENV AzureWebJobsScriptRoot=/home/site/wwwroot \ - HOME=/home \ - FUNCTIONS_WORKER_RUNTIME=dotnet-isolated \ - DOTNET_USE_POLLING_FILE_WATCHER=true \ - HOST_VERSION=${HOST_VERSION} - -# Fix from https://github.com/GoogleCloudPlatform/google-cloud-dotnet-powerpack/issues/22#issuecomment-729895157 -RUN apt-get update && \ - apt-get install -y libc-dev - -COPY --from=runtime-image [ "/azure-functions-host", "/azure-functions-host" ] -COPY --from=runtime-image [ "/FuncExtensionBundles", "/FuncExtensionBundles" ] - -EXPOSE 2222 80 - -RUN apt-get update && \ - apt-get install -y --no-install-recommends gnupg wget unzip curl dialog openssh-server && \ - # Add remote dotnet debugger - curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -v vs2017u5 -l /root/vsdbg && \ - echo "root:Docker!" | chpasswd - -# This is current not working with the .NET 6.0 image based on bullseye. Tracking here: https://github.com/Azure/azure-functions-docker/issues/451 -# 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 - -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/4/bullseye/amd64/dotnet/dotnet-isolated/dotnet-isolated-composite.template b/host/4/bullseye/amd64/dotnet/dotnet-isolated/dotnet-isolated-composite.template new file mode 100644 index 000000000..8ee8047d4 --- /dev/null +++ b/host/4/bullseye/amd64/dotnet/dotnet-isolated/dotnet-isolated-composite.template @@ -0,0 +1,39 @@ +FROM mcr.microsoft.com/dotnet/nightly/runtime:6.0.0 +ARG HOST_VERSION + +ENV AzureWebJobsScriptRoot=/home/site/wwwroot \ + HOME=/home \ + FUNCTIONS_WORKER_RUNTIME=dotnet-isolated \ + DOTNET_USE_POLLING_FILE_WATCHER=true \ + HOST_VERSION=${HOST_VERSION} + +# Fix from https://github.com/GoogleCloudPlatform/google-cloud-dotnet-powerpack/issues/22#issuecomment-729895157 +RUN apt-get update && \ + apt-get install -y libc-dev + +COPY --from=runtime-image [ "/azure-functions-host", "/azure-functions-host" ] +COPY --from=runtime-image [ "/FuncExtensionBundles", "/FuncExtensionBundles" ] + +EXPOSE 2222 80 + +RUN apt-get update && \ + apt-get install -y --no-install-recommends gnupg wget unzip curl dialog openssh-server && \ + # Add remote dotnet debugger + curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -v vs2017u5 -l /root/vsdbg && \ + echo "root:Docker!" | chpasswd + +# This is current not working with the .NET 6.0 image based on bullseye. Tracking here: https://github.com/Azure/azure-functions-docker/issues/451 +# 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 + +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/4/bullseye/amd64/java/java11/java11-appservice.Dockerfile b/host/4/bullseye/amd64/java/java11/java11-appservice.Dockerfile deleted file mode 100644 index ad34b91f3..000000000 --- a/host/4/bullseye/amd64/java/java11/java11-appservice.Dockerfile +++ /dev/null @@ -1,74 +0,0 @@ -# Build the runtime from source -ARG HOST_VERSION=4.0.1.16815 -ARG JAVA_VERSION=11u11 -FROM mcr.microsoft.com/dotnet/sdk:6.0.100-rc.2 AS runtime-image -ARG HOST_VERSION - -ENV PublishWithAspNetCoreTargetManifest=false -ENV DEBIAN_FRONTEND=noninteractive - -RUN BUILD_NUMBER=$(echo ${HOST_VERSION} | cut -d'.' -f 4) && \ - 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 && \ - find /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION/bin/runtimes/ -mindepth 1 -type d -not -name "linux-x64" -prune -exec rm -rf {} + && \ - 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 &&\ - find /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2/bin/runtimes/ -mindepth 1 -type d -not -name "linux-x64" -prune -exec rm -rf {} + && \ - 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/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3/bin/runtimes/ -mindepth 1 -type d -not -name "linux-x64" -prune -exec rm -rf {} + && \ - find /FuncExtensionBundles/ -type f -exec chmod 644 {} \; - -FROM mcr.microsoft.com/java/jre-headless:${JAVA_VERSION}-zulu-debian10-with-tools as jre -FROM mcr.microsoft.com/dotnet/nightly/runtime-deps:6.0.0 -ARG HOST_VERSION - -EXPOSE 2222 80 - -ENV AzureWebJobsScriptRoot=/home/site/wwwroot \ - HOME=/home \ - FUNCTIONS_WORKER_RUNTIME=java \ - DOTNET_USE_POLLING_FILE_WATCHER=true \ - HOST_VERSION=${HOST_VERSION} - -# Fix from https://github.com/GoogleCloudPlatform/google-cloud-dotnet-powerpack/issues/22#issuecomment-729895157 -RUN apt-get update && \ - apt-get install -y libc-dev - -COPY --from=runtime-image [ "/azure-functions-host", "/azure-functions-host" ] -COPY --from=runtime-image [ "/workers/java", "/azure-functions-host/workers/java" ] -COPY --from=jre [ "/usr/lib/jvm/zre-hl-tools-11-azure-amd64", "/usr/lib/jvm/zre-11-azure-amd64" ] -COPY sshd_config /etc/ssh/ -COPY start.sh /azure-functions-host/ -COPY --from=runtime-image [ "/FuncExtensionBundles", "/FuncExtensionBundles" ] - -ENV JAVA_HOME /usr/lib/jvm/zre-11-azure-amd64 - -RUN apt-get update && \ - apt-get install -y --no-install-recommends openssh-server dialog && \ - echo "root:Docker!" | chpasswd - -RUN chmod +x /azure-functions-host/start.sh - -ENTRYPOINT ["/azure-functions-host/start.sh"] diff --git a/host/4/bullseye/amd64/java/java11/java11-composite.template b/host/4/bullseye/amd64/java/java11/java11-composite.template new file mode 100644 index 000000000..e923e05a4 --- /dev/null +++ b/host/4/bullseye/amd64/java/java11/java11-composite.template @@ -0,0 +1,34 @@ +ARG JAVA_VERSION=11u7 + +FROM mcr.microsoft.com/java/jre-headless:${JAVA_VERSION}-zulu-debian10-with-tools as jre +FROM mcr.microsoft.com/dotnet/nightly/runtime-deps:6.0.0 +ARG HOST_VERSION + +EXPOSE 2222 80 + +ENV AzureWebJobsScriptRoot=/home/site/wwwroot \ + HOME=/home \ + FUNCTIONS_WORKER_RUNTIME=java \ + DOTNET_USE_POLLING_FILE_WATCHER=true \ + HOST_VERSION=${HOST_VERSION} + +# Fix from https://github.com/GoogleCloudPlatform/google-cloud-dotnet-powerpack/issues/22#issuecomment-729895157 +RUN apt-get update && \ + apt-get install -y libc-dev + +COPY --from=runtime-image [ "/azure-functions-host", "/azure-functions-host" ] +COPY --from=runtime-image [ "/workers/java", "/azure-functions-host/workers/java" ] +COPY --from=jre [ "/usr/lib/jvm/zre-hl-tools-11-azure-amd64", "/usr/lib/jvm/zre-11-azure-amd64" ] +COPY sshd_config /etc/ssh/ +COPY start.sh /azure-functions-host/ +COPY --from=runtime-image [ "/FuncExtensionBundles", "/FuncExtensionBundles" ] + +ENV JAVA_HOME /usr/lib/jvm/zre-11-azure-amd64 + +RUN apt-get update && \ + apt-get install -y --no-install-recommends openssh-server dialog && \ + echo "root:Docker!" | chpasswd + +RUN chmod +x /azure-functions-host/start.sh + +ENTRYPOINT ["/azure-functions-host/start.sh"] diff --git a/host/4/bullseye/amd64/java/java8/java8-composite.template b/host/4/bullseye/amd64/java/java8/java8-composite.template new file mode 100644 index 000000000..26f98a627 --- /dev/null +++ b/host/4/bullseye/amd64/java/java8/java8-composite.template @@ -0,0 +1,34 @@ +ARG JAVA_VERSION=8u252 + +FROM mcr.microsoft.com/java/jre-headless:${JAVA_VERSION}-zulu-debian10-with-tools as jre +FROM mcr.microsoft.com/dotnet/nightly/runtime-deps:6.0.0 +ARG HOST_VERSION + +EXPOSE 2222 80 + +ENV AzureWebJobsScriptRoot=/home/site/wwwroot \ + HOME=/home \ + FUNCTIONS_WORKER_RUNTIME=java \ + DOTNET_USE_POLLING_FILE_WATCHER=true \ + HOST_VERSION=${HOST_VERSION} + +# Fix from https://github.com/GoogleCloudPlatform/google-cloud-dotnet-powerpack/issues/22#issuecomment-729895157 +RUN apt-get update && \ + apt-get install -y libc-dev + +COPY --from=runtime-image [ "/azure-functions-host", "/azure-functions-host" ] +COPY --from=runtime-image [ "/workers/java", "/azure-functions-host/workers/java" ] +COPY --from=jre [ "/usr/lib/jvm/zre-hl-8-azure-amd64", "/usr/lib/jvm/zre-8-azure-amd64" ] +COPY sshd_config /etc/ssh/ +COPY start.sh /azure-functions-host/ +COPY --from=runtime-image [ "/FuncExtensionBundles", "/FuncExtensionBundles" ] + +ENV JAVA_HOME /usr/lib/jvm/zre-8-azure-amd64 + +RUN apt-get update && \ + apt-get install -y --no-install-recommends openssh-server dialog && \ + echo "root:Docker!" | chpasswd + +RUN chmod +x /azure-functions-host/start.sh + +ENTRYPOINT ["/azure-functions-host/start.sh"] diff --git a/host/4/bullseye/amd64/node/node14/node14-appservice.Dockerfile b/host/4/bullseye/amd64/node/node14/node14-appservice.Dockerfile deleted file mode 100644 index 6a781cb2d..000000000 --- a/host/4/bullseye/amd64/node/node14/node14-appservice.Dockerfile +++ /dev/null @@ -1,93 +0,0 @@ -# Build the runtime from source -ARG HOST_VERSION=4.0.1.16815 -FROM mcr.microsoft.com/dotnet/sdk:6.0.100-rc.2 AS runtime-image -ARG HOST_VERSION - -ENV PublishWithAspNetCoreTargetManifest=false - -RUN BUILD_NUMBER=$(echo ${HOST_VERSION} | cut -d'.' -f 4) && \ - 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 && \ - find /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION/bin/runtimes/ -mindepth 1 -type d -not -name "linux-x64" -prune -exec rm -rf {} + && \ - 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 &&\ - find /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2/bin/runtimes/ -mindepth 1 -type d -not -name "linux-x64" -prune -exec rm -rf {} + && \ - 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/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3/bin/runtimes/ -mindepth 1 -type d -not -name "linux-x64" -prune -exec rm -rf {} + && \ - find /FuncExtensionBundles/ -type f -exec chmod 644 {} \; - -FROM mcr.microsoft.com/dotnet/nightly/runtime-deps:6.0.0 -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 - -# This is current not working with the .NET 6.0 image based on bullseye. Tracking here: https://github.com/Azure/azure-functions-docker/issues/451 -# 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} - -# Fix from https://github.com/GoogleCloudPlatform/google-cloud-dotnet-powerpack/issues/22#issuecomment-729895157 -RUN apt-get update && \ - apt-get install -y libc-dev - -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 - -# This is current not working with the .NET 6.0 image based on bullseye. Tracking here: https://github.com/Azure/azure-functions-docker/issues/451 -# 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 - -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/4/bullseye/amd64/node/node14/node14-composite.template b/host/4/bullseye/amd64/node/node14/node14-composite.template new file mode 100644 index 000000000..dbf17d728 --- /dev/null +++ b/host/4/bullseye/amd64/node/node14/node14-composite.template @@ -0,0 +1,53 @@ +FROM mcr.microsoft.com/dotnet/nightly/runtime-deps:6.0.0 +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 + +# This is current not working with the .NET 6.0 image based on bullseye. Tracking here: https://github.com/Azure/azure-functions-docker/issues/451 +# 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} + +# Fix from https://github.com/GoogleCloudPlatform/google-cloud-dotnet-powerpack/issues/22#issuecomment-729895157 +RUN apt-get update && \ + apt-get install -y libc-dev + +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 + +# This is current not working with the .NET 6.0 image based on bullseye. Tracking here: https://github.com/Azure/azure-functions-docker/issues/451 +# 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 + +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/4/bullseye/amd64/node/node16/node16-appservice.Dockerfile b/host/4/bullseye/amd64/node/node16/node16-appservice.Dockerfile deleted file mode 100644 index 8e827283e..000000000 --- a/host/4/bullseye/amd64/node/node16/node16-appservice.Dockerfile +++ /dev/null @@ -1,93 +0,0 @@ -# Build the runtime from source -ARG HOST_VERSION=4.0.1.16815 -FROM mcr.microsoft.com/dotnet/sdk:6.0.100-rc.2 AS runtime-image -ARG HOST_VERSION - -ENV PublishWithAspNetCoreTargetManifest=false - -RUN BUILD_NUMBER=$(echo ${HOST_VERSION} | cut -d'.' -f 4) && \ - 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 && \ - find /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION/bin/runtimes/ -mindepth 1 -type d -not -name "linux-x64" -prune -exec rm -rf {} + && \ - 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 &&\ - find /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2/bin/runtimes/ -mindepth 1 -type d -not -name "linux-x64" -prune -exec rm -rf {} + && \ - 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/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3/bin/runtimes/ -mindepth 1 -type d -not -name "linux-x64" -prune -exec rm -rf {} + && \ - find /FuncExtensionBundles/ -type f -exec chmod 644 {} \; - -FROM mcr.microsoft.com/dotnet/nightly/runtime-deps:6.0.0 -ARG HOST_VERSION - -RUN apt-get update && \ - apt-get install -y curl gnupg && \ - curl -sL https://deb.nodesource.com/setup_16.x | bash - && \ - apt-get update && \ - apt-get install -y nodejs - -# This is current not working with the .NET 6.0 image based on bullseye. Tracking here: https://github.com/Azure/azure-functions-docker/issues/451 -# 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} - -# Fix from https://github.com/GoogleCloudPlatform/google-cloud-dotnet-powerpack/issues/22#issuecomment-729895157 -RUN apt-get update && \ - apt-get install -y libc-dev - -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 - -# This is current not working with the .NET 6.0 image based on bullseye. Tracking here: https://github.com/Azure/azure-functions-docker/issues/451 -# 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 - -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/4/bullseye/amd64/node/node16/node16-composite.template b/host/4/bullseye/amd64/node/node16/node16-composite.template new file mode 100644 index 000000000..733118fcc --- /dev/null +++ b/host/4/bullseye/amd64/node/node16/node16-composite.template @@ -0,0 +1,53 @@ +FROM mcr.microsoft.com/dotnet/nightly/runtime-deps:6.0.0 +ARG HOST_VERSION + +RUN apt-get update && \ + apt-get install -y curl gnupg && \ + curl -sL https://deb.nodesource.com/setup_16.x | bash - && \ + apt-get update && \ + apt-get install -y nodejs + +# This is current not working with the .NET 6.0 image based on bullseye. Tracking here: https://github.com/Azure/azure-functions-docker/issues/451 +# 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} + +# Fix from https://github.com/GoogleCloudPlatform/google-cloud-dotnet-powerpack/issues/22#issuecomment-729895157 +RUN apt-get update && \ + apt-get install -y libc-dev + +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 + +# This is current not working with the .NET 6.0 image based on bullseye. Tracking here: https://github.com/Azure/azure-functions-docker/issues/451 +# 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 + +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/4/bullseye/amd64/python/python37/python37-appservice.Dockerfile b/host/4/bullseye/amd64/python/python37/python37-composite.template similarity index 50% rename from host/4/bullseye/amd64/python/python37/python37-appservice.Dockerfile rename to host/4/bullseye/amd64/python/python37/python37-composite.template index 9109be657..d28900401 100644 --- a/host/4/bullseye/amd64/python/python37/python37-appservice.Dockerfile +++ b/host/4/bullseye/amd64/python/python37/python37-composite.template @@ -1,43 +1,3 @@ -# Build the runtime from source -ARG HOST_VERSION=4.0.1.16815 -FROM mcr.microsoft.com/dotnet/sdk:6.0.100-rc.2 AS runtime-image -ARG HOST_VERSION - -ENV PublishWithAspNetCoreTargetManifest=false - -RUN BUILD_NUMBER=$(echo ${HOST_VERSION} | cut -d'.' -f 4) && \ - 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 && \ - find /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION/bin/runtimes/ -mindepth 1 -type d -not -name "linux-x64" -prune -exec rm -rf {} + && \ - 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 &&\ - find /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2/bin/runtimes/ -mindepth 1 -type d -not -name "linux-x64" -prune -exec rm -rf {} + && \ - 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/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3/bin/runtimes/ -mindepth 1 -type d -not -name "linux-x64" -prune -exec rm -rf {} + && \ - find /FuncExtensionBundles/ -type f -exec chmod 644 {} \; - FROM python:3.7-slim-buster ARG HOST_VERSION diff --git a/host/4/bullseye/amd64/python/python38/python38-appservice.Dockerfile b/host/4/bullseye/amd64/python/python38/python38-composite.template similarity index 50% rename from host/4/bullseye/amd64/python/python38/python38-appservice.Dockerfile rename to host/4/bullseye/amd64/python/python38/python38-composite.template index 951bc598d..9c4d4778e 100644 --- a/host/4/bullseye/amd64/python/python38/python38-appservice.Dockerfile +++ b/host/4/bullseye/amd64/python/python38/python38-composite.template @@ -1,43 +1,3 @@ -# Build the runtime from source -ARG HOST_VERSION=4.0.1.16815 -FROM mcr.microsoft.com/dotnet/sdk:6.0.100-rc.2 AS runtime-image -ARG HOST_VERSION - -ENV PublishWithAspNetCoreTargetManifest=false - -RUN BUILD_NUMBER=$(echo ${HOST_VERSION} | cut -d'.' -f 4) && \ - 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 && \ - find /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION/bin/runtimes/ -mindepth 1 -type d -not -name "linux-x64" -prune -exec rm -rf {} + && \ - 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 &&\ - find /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2/bin/runtimes/ -mindepth 1 -type d -not -name "linux-x64" -prune -exec rm -rf {} + && \ - 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/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3/bin/runtimes/ -mindepth 1 -type d -not -name "linux-x64" -prune -exec rm -rf {} + && \ - find /FuncExtensionBundles/ -type f -exec chmod 644 {} \; - FROM python:3.8-slim-buster ARG HOST_VERSION diff --git a/host/4/bullseye/amd64/python/python39/python39-appservice.Dockerfile b/host/4/bullseye/amd64/python/python39/python39-composite.template similarity index 50% rename from host/4/bullseye/amd64/python/python39/python39-appservice.Dockerfile rename to host/4/bullseye/amd64/python/python39/python39-composite.template index 9de525a48..705bbb535 100644 --- a/host/4/bullseye/amd64/python/python39/python39-appservice.Dockerfile +++ b/host/4/bullseye/amd64/python/python39/python39-composite.template @@ -1,43 +1,3 @@ -# Build the runtime from source -ARG HOST_VERSION=4.0.1.16815 -FROM mcr.microsoft.com/dotnet/sdk:6.0.100-rc.2 AS runtime-image -ARG HOST_VERSION - -ENV PublishWithAspNetCoreTargetManifest=false - -RUN BUILD_NUMBER=$(echo ${HOST_VERSION} | cut -d'.' -f 4) && \ - 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 && \ - find /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION/bin/runtimes/ -mindepth 1 -type d -not -name "linux-x64" -prune -exec rm -rf {} + && \ - 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 &&\ - find /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V2/bin/runtimes/ -mindepth 1 -type d -not -name "linux-x64" -prune -exec rm -rf {} + && \ - 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/Microsoft.Azure.Functions.ExtensionBundle/$EXTENSION_BUNDLE_VERSION_V3/bin/runtimes/ -mindepth 1 -type d -not -name "linux-x64" -prune -exec rm -rf {} + && \ - find /FuncExtensionBundles/ -type f -exec chmod 644 {} \; - FROM python:3.9-slim-buster ARG HOST_VERSION diff --git a/host/4/dotnet-build.yml b/host/4/dotnet-build.yml index 3370e4298..1778b5722 100644 --- a/host/4/dotnet-build.yml +++ b/host/4/dotnet-build.yml @@ -8,6 +8,7 @@ pr: - release/4.x paths: include: + - host/4/bullseye/amd64/base/* - host/4/bullseye/amd64/dotnet/* trigger: @@ -18,6 +19,7 @@ trigger: - release/4.x paths: include: + - host/4/bullseye/amd64/base/* - host/4/bullseye/amd64/dotnet/* steps: @@ -31,6 +33,12 @@ steps: env: pswd: $(dockerPassword) + - bash: | + ./host/generate-composite.sh -4 dotnet + + displayName: create dotnet-appservice dockerfiles + continueOnError: false + - bash: | set -e IMAGE_NAME=azurefunctions.azurecr.io/azure-functions/4/dotnet:$(Build.SourceBranchName) @@ -59,11 +67,11 @@ steps: set -e IMAGE_NAME=azurefunctions.azurecr.io/azure-functions/4/dotnet:$(Build.SourceBranchName)-appservice docker build -t $IMAGE_NAME \ - -f host/4/bullseye/amd64/dotnet/dotnet-inproc/dotnet-appservice.Dockerfile \ - host/4/bullseye/amd64/dotnet/dotnet-inproc/ + -f host/4/bullseye/amd64/out/dotnet/dotnet-inproc-appservice.Dockerfile \ + host/4/bullseye/amd64/out/dotnet/ npm run test $IMAGE_NAME --prefix test/ docker push $IMAGE_NAME - displayName: dotnet-appservice + displayName: dotnet-inproc-appservice continueOnError: false - bash: | @@ -95,8 +103,8 @@ steps: IMAGE_NAME=azurefunctions.azurecr.io/azure-functions/4/dotnet-isolated:$(Build.SourceBranchName)-dotnet-isolated6.0-appservice docker build -t $IMAGE_NAME \ - -f host/4/bullseye/amd64/dotnet/dotnet-isolated/dotnet-isolated-appservice.Dockerfile \ - host/4/bullseye/amd64/dotnet/dotnet-isolated/ + -f host/4/bullseye/amd64/out/dotnet/dotnet-isolated-appservice.Dockerfile \ + host/4/bullseye/amd64/out/dotnet/ npm run test $IMAGE_NAME --prefix test/ docker push $IMAGE_NAME displayName: dotnet-isolated-appservice (.NET 6) diff --git a/host/4/java-build.yml b/host/4/java-build.yml index 39f35ca0b..11ceca0db 100644 --- a/host/4/java-build.yml +++ b/host/4/java-build.yml @@ -8,6 +8,7 @@ pr: - release/4.x paths: include: + - host/4/bullseye/amd64/base/* - host/4/bullseye/amd64/java/java8/* - host/4/bullseye/amd64/java/java11/* @@ -19,6 +20,7 @@ trigger: - release/4.x paths: include: + - host/4/bullseye/amd64/base/* - host/4/bullseye/amd64/java/java8/* - host/4/bullseye/amd64/java/java11/* @@ -33,6 +35,12 @@ steps: env: pswd: $(dockerPassword) + - bash: | + ./host/generate-composite.sh -4 java + + displayName: create java-appservice dockerfiles + continueOnError: false + - bash: | set -e IMAGE_NAME=azurefunctions.azurecr.io/azure-functions/4/java:$(Build.SourceBranchName)-java8 @@ -59,8 +67,8 @@ steps: set -e IMAGE_NAME=azurefunctions.azurecr.io/azure-functions/4/java:$(Build.SourceBranchName)-java8-appservice docker build -t $IMAGE_NAME \ - -f host/4/bullseye/amd64/java/java8/java8-appservice.Dockerfile \ - host/4/bullseye/amd64/java/java8 + -f host/4/bullseye/amd64/out/java/java8-appservice.Dockerfile \ + host/4/bullseye/amd64/out/java npm run test $IMAGE_NAME --prefix test/ docker push $IMAGE_NAME displayName: java8-appservice @@ -93,8 +101,8 @@ steps: set -e IMAGE_NAME=azurefunctions.azurecr.io/azure-functions/4/java:$(Build.SourceBranchName)-java11-appservice docker build -t $IMAGE_NAME \ - -f host/4/bullseye/amd64/java/java11/java11-appservice.Dockerfile \ - host/4/bullseye/amd64/java/java11 + -f host/4/bullseye/amd64/out/java/java11-appservice.Dockerfile \ + host/4/bullseye/amd64/out/java npm run test $IMAGE_NAME --prefix test/ docker push $IMAGE_NAME displayName: java11-appservice diff --git a/host/4/node-build.yml b/host/4/node-build.yml index e7d0d0219..70d595f2e 100644 --- a/host/4/node-build.yml +++ b/host/4/node-build.yml @@ -8,6 +8,7 @@ pr: - release/4.x paths: include: + - host/4/bullseye/amd64/base/* - host/4/bullseye/amd64/node/* trigger: @@ -18,6 +19,7 @@ trigger: - release/4.x paths: include: + - host/4/bullseye/amd64/base/* - host/4/bullseye/amd64/node/* steps: @@ -30,6 +32,12 @@ steps: continueOnError: false env: pswd: $(dockerPassword) + + - bash: | + ./host/generate-composite.sh -4 node + + displayName: create node-appservice dockerfiles + continueOnError: false - bash: | set -e @@ -60,8 +68,8 @@ steps: IMAGE_NAME=azurefunctions.azurecr.io/azure-functions/4/node:$(Build.SourceBranchName)-node14-appservice docker build -t $IMAGE_NAME \ - -f host/4/bullseye/amd64/node/node14/node14-appservice.Dockerfile \ - host/4/bullseye/amd64/node/node14/ + -f host/4/bullseye/amd64/out/node/node14-appservice.Dockerfile \ + host/4/bullseye/amd64/out/node npm run test $IMAGE_NAME --prefix test/ docker push $IMAGE_NAME displayName: node14-appservice @@ -96,8 +104,8 @@ steps: IMAGE_NAME=azurefunctions.azurecr.io/azure-functions/4/node:$(Build.SourceBranchName)-node16-appservice docker build -t $IMAGE_NAME \ - -f host/4/bullseye/amd64/node/node16/node16-appservice.Dockerfile \ - host/4/bullseye/amd64/node/node16/ + -f host/4/bullseye/amd64/out/node/node16-appservice.Dockerfile \ + host/4/bullseye/amd64/out/node npm run test $IMAGE_NAME --prefix test/ docker push $IMAGE_NAME displayName: node16-appservice diff --git a/host/4/python-build.yml b/host/4/python-build.yml index 749c3a30c..a493a61b0 100644 --- a/host/4/python-build.yml +++ b/host/4/python-build.yml @@ -8,6 +8,7 @@ pr: - release/4.x paths: include: + - host/4/bullseye/amd64/base/* - host/4/bullseye/amd64/python/* trigger: @@ -18,6 +19,7 @@ trigger: - release/4.x paths: include: + - host/4/bullseye/amd64/base/* - host/4/bullseye/amd64/python/* jobs: @@ -25,7 +27,7 @@ jobs: - job: python37 displayName: python 3.7 pool: - vmImage: ubuntu-18.04 + vmImage: 'Ubuntu-latest' steps: - bash: | # login @@ -35,6 +37,13 @@ jobs: continueOnError: false env: pswd: $(dockerPassword) + + - bash: | + ./host/generate-composite.sh -4 python + + displayName: create python-appservice dockerfiles + continueOnError: false + - bash: | set -e IMAGE_NAME=azurefunctions.azurecr.io/azure-functions/4/python:$(Build.SourceBranchName)-python3.7 @@ -63,8 +72,8 @@ jobs: set -e IMAGE_NAME=azurefunctions.azurecr.io/azure-functions/4/python:$(Build.SourceBranchName)-python3.7-appservice docker build -t $IMAGE_NAME \ - -f host/4/bullseye/amd64/python/python37/python37-appservice.Dockerfile \ - host/4/bullseye/amd64/python/python37/ + -f host/4/bullseye/amd64/out/python/python37-appservice.Dockerfile \ + host/4/bullseye/amd64/out/python/ npm run test $IMAGE_NAME --prefix test/ docker push $IMAGE_NAME displayName: python3.7-appservice @@ -95,6 +104,13 @@ jobs: continueOnError: false env: pswd: $(dockerPassword) + + - bash: | + ./host/generate-composite.sh -4 python + + displayName: create python-appservice dockerfiles + continueOnError: false + - bash: | set -e IMAGE_NAME=azurefunctions.azurecr.io/azure-functions/4/python:$(Build.SourceBranchName)-python3.8 @@ -123,8 +139,8 @@ jobs: set -e IMAGE_NAME=azurefunctions.azurecr.io/azure-functions/4/python:$(Build.SourceBranchName)-python3.8-appservice docker build -t $IMAGE_NAME \ - -f host/4/bullseye/amd64/python/python38/python38-appservice.Dockerfile \ - host/4/bullseye/amd64/python/python38/ + -f host/4/bullseye/amd64/out/python/python38-appservice.Dockerfile \ + host/4/bullseye/amd64/out/python/ npm run test $IMAGE_NAME --prefix test/ docker push $IMAGE_NAME displayName: python3.8-appservice @@ -158,6 +174,12 @@ jobs: env: pswd: $(dockerPassword) + - bash: | + ./host/generate-composite.sh -4 python + + displayName: create python-appservice dockerfiles + continueOnError: false + - bash: | set -e IMAGE_NAME=azurefunctions.azurecr.io/azure-functions/4/python:$(Build.SourceBranchName)-python3.9 @@ -191,8 +213,8 @@ jobs: IMAGE_NAME=azurefunctions.azurecr.io/azure-functions/4/python:$(Build.SourceBranchName)-python3.9-appservice docker build -t $IMAGE_NAME \ - -f host/4/bullseye/amd64/python/python39/python39-appservice.Dockerfile \ - host/4/bullseye/amd64/python/python39/ + -f host/4/bullseye/amd64/out/python/python39-appservice.Dockerfile \ + host/4/bullseye/amd64/out/python/ npm run test $IMAGE_NAME --prefix test/ docker push $IMAGE_NAME displayName: python3.9-appservice diff --git a/host/3.0/buster/amd64/base/generate-composite.sh b/host/generate-composite.sh similarity index 81% rename from host/3.0/buster/amd64/base/generate-composite.sh rename to host/generate-composite.sh index d4bd01067..17178a14e 100755 --- a/host/3.0/buster/amd64/base/generate-composite.sh +++ b/host/generate-composite.sh @@ -5,6 +5,21 @@ DIR=$(dirname $0) IFS=$'\n' +select_version() { + ## Selects the directory of the version to be generated + ## Defaults to v3 for now + if [ "$VERSION" == "4" ]; then + echo "Version 4 selected" + DIR=$(dirname $0)/4/bullseye/amd64/base + elif [ "$VERSION" == "3" ]; then + echo "Version 4 selected" + DIR=$(dirname $0)/3.0/buster/amd64/base + else + echo "No valid version selected. Must provide a valid version via -3 or -4 flags" + exit 1 + fi +} + globalize_args() { ## This method is used to bring all args preceding any From statements to the top of the file. ## Allows for ARGs defined globally in composite images to be global in the compiled dockerfile @@ -84,24 +99,37 @@ copy_shared_config() { } clear_outputdir() { + ## Seems to not be working currently. Further investigation needed echo "Clearing output folder..." rootdir=$"$DIR/../out/*" rm -rf rootdir } -echo "Dir is : $DIR" # Defines a flag -r : Release Mode. Release mode will generate artifacts in a folder titled /release/ # These .Dockerfile artifacts will be used to create the containers uploaded to ACR. Increases trace-ability. -while getopts "r" flag;do +# Flags must come before parameters. +while getopts ":r43" flag;do case ${flag} in r) RELEASE="true" echo "Release Mode is enabled" ;; + 4) + VERSION="4" + echo "Version 4 selected" + ;; + 3) + VERSION="3" + echo "Version 3 selected" + ;; esac done +select_version + +echo "Dir is : $DIR" + if [ -z $RELEASE ]; then clear_outputdir fi @@ -110,6 +138,7 @@ fi declare -a argarray for arg do if [ "${arg:0:1}" != '-' ]; then + echo $arg argarray+=($arg) fi done @@ -121,7 +150,7 @@ fi if [ ${#argarray[@]} == 1 ] && [ "$argarray" == "all" ]; then echo "All supported languages targetted." - supportedlangs=("java" "node" "python") + supportedlangs=("java" "node" "python" "dotnet") argarray=(${supportedlangs[@]}) fi