-
Notifications
You must be signed in to change notification settings - Fork 1
Propagate log directory to cartridge-cli command #83
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it better to install rocks in an image so that the container of this image can be started immediately?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't completely get what you suggest. The rocks will be installed prior to launching the application according to
CMD
statement. If the contents ofCARTRIDGE_SRC_DIR
are not changed, the container will run almost immediately because thecartridge build
command will just do nothing and return quickly.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realized that my previous code isn't working as I wanted it.
We specify
CARTRIDGE_SRC_DIR
in an image assembling phase. So I wanted to build the application(install rocks) in the assembling phase.But it doesn't work now, because we use
COPY
(notADD
) to copy files from the directory to a container.In my conception, it would be great if we can collect rocks in an image-building phase. Then check whether nothing changed on the container starting after an image has been built.
Your changes don't change behavior so that you can merge them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that building the rocks on image building phase is not completely correct since the users can further change the Cartridge app dependencies. That should not lead to rebuilding the image, since only rocks will need to be rebuilt, and this is faster than the whole image rebuild.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wrong. Copy work during image building
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And that's why I left 2 lines with cartridge build. The first one in RUN command (during image building). The second one in CMD command(on container starting)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can add one more stage, making COPY + RUN a separate layer that will be rebuilt without all the deps.
Also as an idea of future improvement, we may also specify the deps to be installed by
yum
in an external file so that we would be able automatically rebuild the whole image too in case if we want an external dependency for our Cartridge app (like a newer SSL library or whatever).