Comments (9)
The container image builder creates has to have something to hold it open. All RUN commands are from exec.
I did a docker run equivalent and it worked for me. Not sure what the difference is.
from imagebuilder.
Issues go stale after 90d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen
.
If this issue is safe to close now please do so with /close
.
/lifecycle stale
from imagebuilder.
Stale issues rot after 30d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen
.
If this issue is safe to close now please do so with /close
.
/lifecycle rotten
/remove-lifecycle stale
from imagebuilder.
Rotten issues close after 30d of inactivity.
Reopen the issue by commenting /reopen
.
Mark the issue as fresh by commenting /remove-lifecycle rotten
.
Exclude this issue from closing again by commenting /lifecycle frozen
.
/close
from imagebuilder.
@openshift-bot: Closing this issue.
In response to this:
Rotten issues close after 30d of inactivity.
Reopen the issue by commenting
/reopen
.
Mark the issue as fresh by commenting/remove-lifecycle rotten
.
Exclude this issue from closing again by commenting/lifecycle frozen
./close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
from imagebuilder.
/reopen
it's still a problem and causing some amount of grief in OSBS builds, FWIW
from imagebuilder.
@sosiouxme: Reopened this issue.
In response to this:
/reopen
it's still a problem and causing some amount of grief in OSBS builds, FWIW
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
from imagebuilder.
/remove-lifecycle rotten
/lifecycle frozen
from imagebuilder.
imagebuilder keeps track of the command and entrypoint of the base image, and when it encounters a Dockerfile instruction for changing them, it makes note of them. As @smarterclayton mentioned, it has to supply the engine with some command to make the working container idle so that it can use the "exec" engine API call to handle RUN instructions. Then, at commit-time, imagebuilder supplies the engine either with the value it retrieved from the base image, or the updated value it was given in the Dockerfile.
In the example we're seeing, the base image, fedora:27, doesn't supply an entrypoint or command. Because the build includes a RUN instruction, the working container is created and started with a dummy command ("sleep 86400"). At commit-time, imagebuilder supplies an image configuration structure to the engine where, because the base image didn't supply a value, and the Dockerfile didn't either, the command and entrypoint fields remain blank. The engine starts with the container's configuration, overwrites fields in it with fields that are set in the the image configuration it got from imagebuilder, and writes the image. The method for merging the configuration the client supplies at commit-time with the configuration of the container means that certain fields like the command, entrypoint, and user can't be unset or cleared. They can only be changed to some other non-empty value.
The combination of not having a command in the base image and having RUN instructions is what's triggering the problem, but I don't see any way to clear the field at commit-time in the engine API.
Possible workarounds would be to either not use RUN instructions (imagebuilder doesn't set a command unless it needs to start the working container, and it doesn't need to start a container unless it needs to use an exec call to run a command in it), make sure the base image specifies a command (apparently fedora did starting with fedora:28), or always specify a command in a Dockerfile, even if it's just a CMD ["/bin/bash"]
.
There's probably an argument to be made that imagebuilder should be supplying a default command and entrypoint when the base image doesn't include one, but I haven't worked out how it would impact tests.
from imagebuilder.
Related Issues (20)
- TestDispatchArgDefaultBuiltins is failing on arm/v8 HOT 4
- Regression in ENV expansion HOT 2
- COPY does not handle empty arguments well HOT 3
- Multi-stage Quarkus GraalVM builds do not produce runnable images HOT 5
- COPY --chown does not work right
- ADD should unpack archives HOT 5
- go install github.com/openshift/imagebuilder/cmd/[email protected] failed HOT 2
- Imagebuilder gets stuck while copying content between stages with --chown for a user with specific UID HOT 2
- Does imagebuilder support concurrent building? HOT 5
- issue in COPY from one stage to next HOT 8
- ENV does not inherit through multiple layers
- [Feature] Add --keep-ownership option to add/copy commands to keep file ownership. HOT 4
- dockerclient quietly ignores the --chmod flag for ADD/COPY HOT 3
- COPY tarball treats destination as directory
- Imagebuilder expands `ARGS` which are not declared HOT 3
- BUG: labels following missing line-continuation character are ignored HOT 7
- LCOWSupported method is not available in newer docker libs HOT 4
- Build image failed without docker HOT 5
- TestDispatchFromFlagsAndUseBuiltInArgs fails on arm HOT 4
- Generic way to build the first stage
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imagebuilder.