Summary
When using pack build with the --extension ... and the --publish flag, it fails with the following message: ERROR: failed to build: executing lifecycle: container start: Error response from daemon: unable to find user root: no matching entries in passwd file.
Reproduction
This issue is reproduced in the example repository: https://github.com/evo-jwueppin/buildpack-extension-example in the latest run of the workflow: https://github.com/evo-jwueppin/buildpack-extension-example/actions/runs/...
Steps
- Build the extension image:
generate:
#!/usr/bin/env bash
set -eo pipefail
echo run with ${user_id}
# 1. GET ARGS
output_dir=$CNB_OUTPUT_DIR
# 2. GENERATE run.Dockerfile
cat >>"${output_dir}/run.Dockerfile" <<EOL
ARG base_image
FROM \${base_image}
USER root
RUN apt-get update && apt-get install -y rsync
ARG user_id
USER \${user_id}
EOL
extension.toml:
# Buildpack API version
api = "0.12"
# Extension ID and metadata
[extension]
id = "example-scope/buildpack-image-with-extension"
version = "1.0.0"
name = "Rsync Extension"
homepage = "https://github.com/evo-jwueppin/buildpack-extension-example"
description = "A simple extension that installs rsync on the runtime base image"
pack-cli:
pack extension package ghcr.io/evo-jwueppin/buildpack-extension:latest \
--publish \
--path ./rsync-extension \
--format image \
--target "linux/amd64"
- Build the run-image with the extension image
pack-cli:
pack build ghcr.io/evo-jwueppin/buildpack-image-with-extension:latest \
--extension ghcr.io/evo-jwueppin/buildpack-extension:latest \
-B paketobuildpacks/builder-jammy-base:latest \
--verbose \
--clear-cache \
--publish
Current behavior
When building the run-image with the extension an error occurs:
ERROR: failed to build: executing lifecycle: container start: Error response from daemon: unable to find user root: no matching entries in passwd file but when running the same command from Reproduction-Step 2. without the --publish flag everything works as expected and the image succesfully builds.
Expected behavior
The image building and publishing succesfully.
Possibly-Related
buildpacks/lifecycle#1504
Summary
When using
pack buildwith the--extension ...and the--publishflag, it fails with the following message:ERROR: failed to build: executing lifecycle: container start: Error response from daemon: unable to find user root: no matching entries in passwd file.Reproduction
This issue is reproduced in the example repository: https://github.com/evo-jwueppin/buildpack-extension-example in the latest run of the workflow: https://github.com/evo-jwueppin/buildpack-extension-example/actions/runs/...
Steps
generate:
extension.toml:
pack-cli:
pack-cli:
Current behavior
When building the run-image with the extension an error occurs:
ERROR: failed to build: executing lifecycle: container start: Error response from daemon: unable to find user root: no matching entries in passwd filebut when running the same command from Reproduction-Step 2. without the --publish flag everything works as expected and the image succesfully builds.Expected behavior
The image building and publishing succesfully.
Possibly-Related
buildpacks/lifecycle#1504