Oracle Cloud:使用Cloud Shell部署Python函数的问题

p8h8hvxi  于 2024-01-05  发布在  Python
关注(0)|答案(1)|浏览(144)

我想使用Oracle Cloud的函数服务创建一个python函数。为此,我按照Getting started教程使用Cloud Shell Setup进行操作。我按照指示的所有步骤进行操作,但当我使用fn -v deploy --app DBDB_IO_Refresher命令部署函数时,我得到以下错误:

  1. Fn: error running docker build: Cannot create/use builder instance docker for oci_fn_builder : exit status 125

字符串
以下是我遵循的所有指示:

  1. fn list context
  2. fn use context eu-marseille-1
  3. fn update context oracle.compartment-id ocid1.********************
  4. fn update context registry ***********/func-python
  5. docker login -u '***********' mrs.ocir.io
  6. fn list apps
  7. fn init --runtime java hello-test-python
  8. cd hello-test-python
  9. fn -v deploy --app DBDB_IO_Refresher


以下是错误的详细信息

  1. Deploying hello-test-python to app: DBDB_IO_Refresher
  2. Bumped to version 0.0.2
  3. Using Container engine docker
  4. Building image ******/******/func-python/hello-test-python:0.0.2
  5. Dockerfile content
  6. -----------------------------------
  7. FROM fnproject/fn-java-fdk-build:jdk17-1.0.182 as build-stage
  8. WORKDIR /function
  9. ENV MAVEN_OPTS -Dhttp.proxyHost= -Dhttp.proxyPort= -Dhttps.proxyHost= -Dhttps.proxyPort= -Dhttp.nonProxyHosts= -Dmaven.repo.local=/usr/share/maven/ref/repository
  10. ADD pom.xml /function/pom.xml
  11. RUN ["mvn", "package", "dependency:copy-dependencies", "-DincludeScope=runtime", "-DskipTests=true", "-Dmdep.prependGroupId=true", "-DoutputDirectory=target", "--fail-never"]
  12. ADD src /function/src
  13. RUN ["mvn", "package"]
  14. FROM fnproject/fn-java-fdk:jre17-1.0.182
  15. WORKDIR /function
  16. COPY --from=build-stage /function/target/*.jar /function/app/
  17. CMD ["com.example.fn.HelloFunction::handleRequest"]
  18. -----------------------------------
  19. FN_REGISTRY: *****/*******/func-python
  20. Current Context: eu-marseille-1
  21. TargetedPlatform: amd64_arm64HostPlatform: amd64
  22. Fn: error running docker build: Cannot create/use builder instance docker for oci_fn_builder : exit status 125


以下是CLoud Shell安装程序上的docker配置:

  1. pierre_ant@cloudshell:hello-test-python (eu-marseille-1)$ docker version
  2. Client: Docker Engine - Community
  3. Version: 19.03.11-ol
  4. API version: 1.40
  5. Go version: go1.16.2
  6. Git commit: 9bb540d
  7. Built: Fri Jul 23 01:33:55 2021
  8. OS/Arch: linux/amd64
  9. Experimental: false
  10. Server: Docker Engine - Community
  11. Engine:
  12. Version: 19.03.11-ol
  13. API version: 1.40 (minimum version 1.12)
  14. Go version: go1.16.2
  15. Git commit: 9bb540d
  16. Built: Fri Jul 23 01:32:08 2021
  17. OS/Arch: linux/amd64
  18. Experimental: false
  19. Default Registry: docker.io
  20. containerd:
  21. Version: v1.4.8
  22. GitCommit: 7eba5930496d9bbe375fdf71603e610ad737d2b2
  23. runc:
  24. Version: 1.1.7
  25. GitCommit: 860f061
  26. docker-init:
  27. Version: 0.18.0
  28. GitCommit: fec3683


这里是Fn配置:

  1. pierre_ant@cloudshell:hello-test-python (eu-marseille-1)$ fn version
  2. Client version is latest version: 0.6.28
  3. Server version: ?


如果任何人有任何想法或需要进一步的信息,请不要犹豫,我已经被卡住了一个多星期,在网上找不到任何解决方案。

rryofs0p

rryofs0p1#

我也有类似的问题。我们找到的解决方案是在OCI控制台上创建Fn应用程序时选择形状“Generic_X86”(不是X86_ARM也不是ARM),如下所示:

相关问题