Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build S2I Core base image from source #63

Closed
micsafi opened this issue Mar 15, 2021 · 3 comments · Fixed by #65
Closed

Unable to build S2I Core base image from source #63

micsafi opened this issue Mar 15, 2021 · 3 comments · Fixed by #65

Comments

@micsafi
Copy link

micsafi commented Mar 15, 2021

While building the S2I Core base image from source, the base image build fails on the tagging phase:

(base) Mikkos-MacBook-Pro-3:s2i-base-container makelm$ make build TARGET=rhel8 VERSIONS=core VERBOSE=1
Makefile:15: warning: overriding commands for target `core'
common/common.mk:87: warning: ignoring old commands for target `core'
Makefile:15: warning: overriding commands for target `core'
common/common.mk:87: warning: ignoring old commands for target `core'
VERSIONS="core" SKIP_SQUASH=1 UPDATE_BASE= OS=rhel8 CLEAN_AFTER= DOCKER_BUILD_CONTEXT=. OPENSHIFT_NAMESPACES="" CUSTOM_REPO="" REGISTRY="""" /usr/bin/env bash common/build.sh
-> Version core: building image from 'Dockerfile.rhel8' ...
-> Pulling image registry.access.redhat.com/ubi8:latest before building image from Dockerfile.rhel8.
The image registry.access.redhat.com/ubi8:latest is already pulled.
[+] Building 0.2s (10/10) FINISHED                                                                                   
 => [internal] load build definition from Dockerfile.rhel8                                                      0.0s
 => => transferring dockerfile: 43B                                                                             0.0s
 => [internal] load .dockerignore                                                                               0.0s
 => => transferring context: 2B                                                                                 0.0s
 => [internal] load metadata for registry.access.redhat.com/ubi8:latest                                         0.0s
 => [1/5] FROM registry.access.redhat.com/ubi8:latest                                                           0.0s
 => [internal] load build context                                                                               0.0s
 => => transferring context: 573B                                                                               0.0s
 => CACHED [2/5] RUN INSTALL_PKGS="bsdtar   findutils   groff-base   glibc-locale-source   glibc-langpack-en    0.0s
 => CACHED [3/5] COPY ./root/ /                                                                                 0.0s
 => CACHED [4/5] WORKDIR /opt/app-root/src                                                                      0.0s
 => CACHED [5/5] RUN rpm-file-permissions &&   useradd -u 1001 -r -g 0 -d /opt/app-root/src -s /sbin/nologin    0.0s
 => exporting to image                                                                                          0.0s
 => => exporting layers                                                                                         0.0s
 => => writing image sha256:2001f8f3115e301855c50ee940924cd688e95411e968fd2553663f6fe38468ad                    0.0s
VERSIONS="core" SKIP_SQUASH=1 UPDATE_BASE= OS=rhel8 CLEAN_AFTER= DOCKER_BUILD_CONTEXT=. OPENSHIFT_NAMESPACES="" CUSTOM_REPO="" REGISTRY="""" /usr/bin/env bash common/tag.sh
Error: No such object: 
make[1]: *** [core] Error 1
make: *** [build-serial] Error 2

Before running the build, I have installed the coreutils+md2man and updated my path to have the gnuutils to have priority.

@micsafi
Copy link
Author

micsafi commented Mar 15, 2021

Just to add: since the Docker build completes successfully, I can workaround the error by manually tagging the images and pushing them to my private registry. But it would great to understand why the Make build fails on my Mac.

@andreyzher
Copy link
Contributor

Hi @micsafi

Thank you for flagging this issue.

Please confirm the version of Docker Desktop for Mac you're using.

Last I ran this, it was 3.1.0, and the build worked fine. After upgrading to 3.2.2, I'm able to reproduce your issue.
The latest version is using BuildKit by default which has an issue with some of the paths used by the S2I Core image build.
I have created an issue with the S2I image maintainers for further investigation.

In the meantime, you can revert to the old build process by setting the DOCKER_BUILDKIT variable to 0 for the current terminal, or by updating the Docker daemon configuration file with the following snippet:

{ "features": { "buildkit": false } }

image

We will add a note to the runbook about this change in behaviour.

@micsafi
Copy link
Author

micsafi commented Mar 16, 2021

My build findings are with Docker Desktop v. 3.2.1 on MacOS.

I am also happy to confirm that setting DOCKER_BUILDKIT=0 fixes the build issue. I think this is more than sufficient workaround for now! Just add it to the Runbook instructions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants