github.com/graphql-editor/azure-functions-golang-worker@v0.1.0/Dockerfile (about)

     1  FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS runtime-image
     2  
     3  ENV PublishWithAspNetCoreTargetManifest=false
     4  ENV HOST_VERSION=3.0.13113
     5  ENV HOST_COMMIT=0cf47580569246787259ef2a29624cf9e8ce61b0
     6  
     7  RUN BUILD_NUMBER=$(echo $HOST_VERSION | cut -d'.' -f 3) && \
     8      wget https://github.com/Azure/azure-functions-host/archive/$HOST_COMMIT.tar.gz && \
     9      tar xzf $HOST_COMMIT.tar.gz && \
    10      cd azure-functions-host-* && \
    11      dotnet publish -v q /p:BuildNumber=$BUILD_NUMBER /p:CommitHash=$HOST_COMMIT src/WebJobs.Script.WebHost/WebJobs.Script.WebHost.csproj --output /azure-functions-host --runtime linux-x64 && \
    12      rm -rf /azure-functions-host/workers /workers
    13  
    14  FROM mcr.microsoft.com/dotnet/core/runtime-deps:3.1 as runtime-deps
    15  
    16  COPY --from=runtime-image ["/azure-functions-host", "/azure-functions-host"]
    17  
    18  RUN apt-get update && \
    19      apt-get install -y gnupg wget unzip && \
    20      wget https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/1.1.1/Microsoft.Azure.Functions.ExtensionBundle.1.1.1.zip && \
    21      mkdir -p /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/1.1.1 && \
    22      unzip /Microsoft.Azure.Functions.ExtensionBundle.1.1.1.zip -d /FuncExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/1.1.1 && \
    23      rm -f /Microsoft.Azure.Functions.ExtensionBundle.1.1.1.zip
    24  
    25  FROM golang:1.13
    26  
    27  RUN apt-get update && \
    28      apt-get install -y libicu63
    29  
    30  ENV AzureWebJobsScriptRoot=/home/site/wwwroot \
    31      HOME=/home \
    32      FUNCTIONS_WORKER_RUNTIME=golang \
    33      DOTNET_USE_POLLING_FILE_WATCHER=true \
    34  	ASPNETCORE_URLS=http://*:80
    35  
    36  COPY --from=runtime-image [ "/azure-functions-host", "/azure-functions-host" ]
    37  COPY --from=runtime-deps [ "/FuncExtensionBundles", "/FuncExtensionBundles" ]
    38  COPY worker.config.json /azure-functions-host/workers/golang/worker.config.json
    39  EXPOSE 5000
    40  CMD [ "/azure-functions-host/Microsoft.Azure.WebJobs.Script.WebHost" ]