Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Push in quay.io/buildah/stable

未关闭
#851 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
28/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
docker, typescript
领域
cli, devops

调研方向

先从处理 --docker-path、--push 和 BuildKit 验证的 devcontainer build 命令路径入手,然后在 quay.io/buildah/stable 中复现报告的命令。确定是否支持使用 Buildah 进行推送,并记录或实现预期行为;当报告的命令能够正常工作,或该限制已被明确说明并经过测试时,即可完成。

由索引模型根据 Issue 内容生成。

描述

bug podman

Hey! I'm trying to build and push (to gitlab registry) my project in quay.io/buildah/stable build container.
The build works fine when i do:
devcontainer build --docker-path buildah --workspace-folder . --image-name $FQ_IMAGE_NAME

But it fails when I add --push true as:
devcontainer build --docker-path buildah --workspace-folder . --push true --image-name $FQ_IMAGE_NAME

with this error:

[2024-06-28T09:56:10.009Z] @devcontainers/cli 0.65.0. Node.js v20.12.2. linux 6.6.33-0-virt x64.
Error: --platform or --push require BuildKit enabled.
    at mtA (/usr/local/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:466:363)
    at async Pm (/usr/local/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:465:1856)
    at async FrA (/usr/local/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:662:24692)
    at async yrA (/usr/local/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:662:22435)
{"outcome":"error","message":"--platform or --push require BuildKit enabled.","description":"--platform or --push require BuildKit enabled."}

My CI looks like:

container build and push:
  stage: container-build
  image: quay.io/buildah/stable
  variables:
    # Use vfs with buildah. Docker offers overlayfs as a default, but Buildah
    # cannot stack overlayfs on top of another overlayfs filesystem.
    STORAGE_DRIVER: vfs
    # Write all image metadata in the docker format, not the standard OCI format.
    # Newer versions of docker can handle the OCI format, but older versions, like
    # the one shipped with Fedora 30, cannot handle the format.
    BUILDAH_FORMAT: docker
    BUILDAH_ISOLATION: chroot
  before_script:
    # GitLab container registry credentials taken from the
    # [predefined CI/CD variables](../variables/index.md#predefined-cicd-variables)
    # to authenticate to the registry.
    - echo "$CI_REGISTRY_PASSWORD" | buildah login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY
    # install devcontainer
    - dnf install -y nodejs npm python3 make g++
    - npm install -g @devcontainers/cli
  script:
    - devcontainer build --docker-path buildah --workspace-folder . --push true --image-name $FQ_IMAGE_NAME

Does devcontainer only support docker when --push? Or is there some other way to get around this issue?
For now I'll try to use podman and report back.

Thank you for your work btw.

主要语言
TypeScript
星标
3k
派生
461
平均合并
18 分钟
30 天内合并 PR
5

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

devcontainers/cli 的其他 Issue

查看 devcontainers/cli 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。