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

p8h8hvxi  于 12个月前  发布在  Python
关注(0)|答案(1)|浏览(111)

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

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

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

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


以下是错误的详细信息

Deploying hello-test-python to app: DBDB_IO_Refresher
Bumped to version 0.0.2
Using Container engine docker
Building image ******/******/func-python/hello-test-python:0.0.2 
Dockerfile content
-----------------------------------
FROM fnproject/fn-java-fdk-build:jdk17-1.0.182 as build-stage
WORKDIR /function
ENV MAVEN_OPTS -Dhttp.proxyHost= -Dhttp.proxyPort= -Dhttps.proxyHost= -Dhttps.proxyPort= -Dhttp.nonProxyHosts= -Dmaven.repo.local=/usr/share/maven/ref/repository
ADD pom.xml /function/pom.xml
RUN ["mvn", "package", "dependency:copy-dependencies", "-DincludeScope=runtime", "-DskipTests=true", "-Dmdep.prependGroupId=true", "-DoutputDirectory=target", "--fail-never"]
ADD src /function/src
RUN ["mvn", "package"]
FROM fnproject/fn-java-fdk:jre17-1.0.182
WORKDIR /function
COPY --from=build-stage /function/target/*.jar /function/app/
CMD ["com.example.fn.HelloFunction::handleRequest"]
-----------------------------------
FN_REGISTRY:  *****/*******/func-python
Current Context:  eu-marseille-1
TargetedPlatform:  amd64_arm64HostPlatform:  amd64

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


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

pierre_ant@cloudshell:hello-test-python (eu-marseille-1)$ docker version
Client: Docker Engine - Community
 Version:           19.03.11-ol
 API version:       1.40
 Go version:        go1.16.2
 Git commit:        9bb540d
 Built:             Fri Jul 23 01:33:55 2021
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.11-ol
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.16.2
  Git commit:       9bb540d
  Built:            Fri Jul 23 01:32:08 2021
  OS/Arch:          linux/amd64
  Experimental:     false
  Default Registry: docker.io
 containerd:
  Version:          v1.4.8
  GitCommit:        7eba5930496d9bbe375fdf71603e610ad737d2b2
 runc:
  Version:          1.1.7
  GitCommit:        860f061
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683


这里是Fn配置:

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


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

rryofs0p

rryofs0p1#

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

相关问题