首页 > 解决方案 > 清单列表条目中没有匹配的 linux/amd64 清单

问题描述

今天我在 GitHub Actions 中构建我的图像突然遇到这个问题(它在过去的一段时间内运行良好),GitHub Actions 基础操作系统是ubuntu-latest

Warning: Input 'repository' has been deprecated with message: v2 is now available through docker/build-push-action@v2
Run docker/build-push-action@v1
/usr/bin/docker run --name dockergithubactionsv1_3426e3 --label 48c179 --workdir /github/workspace --rm -e JAVA_HOME_11.0.12_x64 -e JAVA_HOME -e JAVA_HOME_11_0_12_X64 -e INPUT_REGISTRY -e INPUT_USERNAME -e INPUT_PASSWORD -e INPUT_TAGS -e INPUT_REPOSITORY -e INPUT_PATH -e INPUT_TAG_WITH_REF -e INPUT_TAG_WITH_SHA -e INPUT_DOCKERFILE -e INPUT_TARGET -e INPUT_ALWAYS_PULL -e INPUT_BUILD_ARGS -e INPUT_CACHE_FROMS -e INPUT_LABELS -e INPUT_ADD_GIT_LABELS -e INPUT_PUSH -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/retire/retire":"/github/workspace" docker/github-actions:v1  "build-push"
Logging in to registry ***
WARNING! Using -*** the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /github/home/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded
Building image [***/reddwarf-pro/dolphin-post:665f8e551bdc05147fee286052ccf3d10a968eb5]
Sending build context to Docker daemon  113.1MB

Step 1/7 : FROM adoptopenjdk/openjdk11-openj9:latest
latest: Pulling from adoptopenjdk/openjdk11-openj9
no matching manifest for linux/amd64 in the manifest list entries
Error: exit status 1
Usage:
  github-actions build-push [flags]

Flags:
  -h, --help   help for build-push

exit status 1

这是我的 GitHub 操作脚本:

   - name: Build image push to aliyun
      uses: docker/build-push-action@v1
      with:
        registry: ${{ secrets.ALI_DOCKER_HUB_REGISTRY }}
        username: ${{ secrets.ALIYUN_DOCKER_REPO_USER_NAME }}
        password: ${{ secrets.ALIYUN_DOCKER_REPO_USER_PASSWORD }}
        tags: ${{ github.sha }}
        repository: reddwarf-pro/dolphin-gateway
        path: 'dolphin-gateway'

这是我的 Dockerfile:

FROM adoptopenjdk/openjdk11-openj9:latest

MAINTAINER jiangxiaoqiang (jiangtingqiang@gmail.com)

ENV LANG=en_US.UTF-8 \
    LC_ALL=en_US.UTF-8 \
    TZ=Asia/Shanghai

RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \
    && echo $TZ > /etc/timezone

ADD build/libs/dolphin-gateway-1.0.0-SNAPSHOT.jar /root/dolphin-gateway-1.0.0-SNAPSHOT.jar

EXPOSE 11014

ENTRYPOINT exec java -Dfile.encoding=UTF-8 -Xmx256M -Xms128M \
                -Xdebug -Xrunjdwp:transport=dt_socket,suspend=n,server=y,address=5019 \
                -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/data/dump \
                -jar /root/dolphin-gateway-1.0.0-SNAPSHOT.jar

哪里出了问题?我应该怎么做才能解决这个问题?我应该怎么做才能避免将来出现这个问题?

标签: docker

解决方案


将 docker 映像更改为指定版本:

FROM adoptopenjdk/openjdk11-openj9:jdk-11.0.11_9_openj9-0.26.0-alpine

作品。


推荐阅读