Bug 1487356
Summary: | docker strategy builds handle .dockerignore inconsistently | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Ben Parees <bparees> |
Component: | Build | Assignee: | Adam Kaplan <adam.kaplan> |
Status: | CLOSED ERRATA | QA Contact: | wewang <wewang> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 3.6.0 | CC: | adam.kaplan, aos-bugs, ccoleman, erich, jokerman, mmccomas, sponnaga, wzheng |
Target Milestone: | --- | Keywords: | OSE41z_next, Reopened |
Target Release: | 4.1.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | 4.1.3 | ||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: |
Cause: in OpenShift Docker strategy builds, .dockerignore files were not processed before sending content to the Docker daemon
Consequence: images included content that developers wanted to be excluded
Fix: engine for building container images was switched to buildah in 4.1.0
Result: .dockerignore files in source repositories are respected during Docker strategy builds
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2019-06-26 08:50:22 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Ben Parees
2017-08-31 17:53:03 UTC
This is because we blindly tar the workdir and send it to the docker daemon: https://github.com/openshift/origin/blob/master/pkg/build/builder/dockerutil.go#L195 Clayton can you add some details about what tool we should be using to create the tar instead? (not a regression, so pushing this out). (still not a regression, still pushing this out, though will try to get to it still) attempt that ended in a dead end: https://github.com/openshift/source-to-image/pull/809 This should be resolved in 4.0 by the move to buildah. Adam can you test this on a 4.0 cluster? This appears to remain an issue. Need to dig a bit further to confirm. Confirmed that this is an issue with buildah. Requested https://github.com/containers/buildah/issues/699 to be repopened. With the introduction of OpenShift 4, Red Hat has delivered or roadmapped a substantial number of features based on feedback by our customers. Many of the enhancements encompass specific RFEs which have been requested, or deliver a comparable solution to a customer problem, rendering an RFE redundant. This bz (RFE) has been identified as a feature request not yet planned or scheduled for an OpenShift release and is being closed. If this feature is still an active request that needs to be tracked, Red Hat Support can assist in filing a request in the new JIRA RFE system, as well as provide you with updates as the RFE progress within our planning processes. Please open a new support case: https://access.redhat.com/support/cases/#/case/new Opening a New Support Case: https://access.redhat.com/support/cases/#/case/new As the new Jira RFE system is not yet public, Red Hat Support can help answer your questions about your RFEs via the same support case system. Adam, it looks like https://github.com/containers/buildah/issues/699 was resolved. Should this BZ instead be marked as fixed in 4.1.0? Ben - this is correct. Now that we're using buildah, .dockerignore should just work. QE team should be able to verify this was fixed with 4.1.0. We should create new BZs if there are further issues with .dockerignore files. Eric we wanted QE to verify this. verified in 4.1.0-0.nightly-2019-06-13-165744 repo: $ tree . ├── Dockerfile ├── subdir │ ├── sub1.txt │ └── sub2.txt ├── test1.txt └── test2.txt 1 directory, 5 files $ more .dockerignore # comment * test* !test2* subdir !*/sub1* result: TEP 3: RUN ls -lR /tmp/src /tmp/src: total 4 drwx------. 2 root root 22 Jun 17 06:27 subdir -rw-rw-r--. 1 root root 6 Jun 17 06:26 test2.txt /tmp/src/subdir: total 4 -rw-rw-r--. 1 root root 9 Jun 17 06:26 sub1.txt Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:1589 |