docker - 清单列表条目中没有匹配的 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 映像更改为指定版本:
FROM adoptopenjdk/openjdk11-openj9:jdk-11.0.11_9_openj9-0.26.0-alpine
作品。
推荐阅读
- c# - 托管 Blazor WASM - 使用 AAD 进行身份验证,但使用 SQL 中的本地用户角色
- python-3.x - 带有 .png/ .jpeg 图像的散点图标记
- excel - 将 Web 浏览器自动化转换为 XmlHTTP 请求
- json - 如何使用带有firebase db的ReactJS上的动态路由在单个页面上通过id传递不同的数据?
- docker - 在 alpine docker 容器 cron 作业中运行 -i 时,ffmpeg 挂起
- r - 如何正确循环遍历 df 列表中的所有 csv 并将其呈现在全局环境中,而无需完整路径名或扩展名结尾为 df?
- python - 测试折叠上的 CV 和欠采样
- javascript - 使用 Javascript 从动态生成的表中的 HTMLCollection 获取值
- javascript - 如何确保 axios 调用中的 onUploadProgress 回调被单元测试覆盖
- r - 如何将前导零添加到某些值?