Azure / Azure/azure-functions-core-tools
Cannot build a working Docker container for a Python app
- Dominant language
- C#
- Stars
- 1.5k
- Forks
- 498
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 14
Description
Reported by Customer:
---
OS: Mac OS Catalina 10.15.4
func version: 3.0.2245
```
$ func init LocalFunctionPython --python --docker
Found Python version 3.7.2 (python).
Writing .gitignore
Writing host.json
Writing local.settings.json
Writing /private/tmp/my-project/LocalFunctionPython/.vscode/extensions.json
Writing Dockerfile
Writing .dockerignore
$ func new --name HttpExample --template "HTTP trigger"
Select a number for template:HTTP trigger
Function name: [HttpTrigger] Writing /private/tmp/my-project/LocalFunctionPython/HttpExample/__init__.py
Writing /private/tmp/my-project/LocalFunctionPython/HttpExample/function.json
The function "HttpExample" was created successfully from the "HTTP trigger" template.
$ func start…. # works fine...
$ func kubernetes deploy --name=azfuncpy --registry=docker.io/REDACTED --namespace=REDACTED
Running 'docker build -t docker.io/REDACTED/azfuncpy /private/tmp/my-project/LocalFunctionPython'...................................................done
Running 'docker pull docker.io/REDACTED/azfuncpy'..done
Error running docker pull docker.io/REDACTED/azfuncpy.
output: Using default tag: latest
Error response from daemon: manifest for REDACTED/azfuncpy:latest not found: manifest unknown: manifest unknown
```
Same steps and results occur when trying to build and deploy a JavaScript function as well.
Is there anything I'm missing to deploy an Azure Function to Kubernetes ?
Note that if I manually build the container image using the Dockerfile available it almost works, there is one extra step required that could also potentially already be incorporated into the template to help streamline this process. You need to append the following in order to inform the por the worker will be exposing or listening, I'm not sure.
```
ENV ASPNETCORE_URLS=http://+:8080
```
---
Contributor guide
Assessment
This issue has not been assessed yet.