Updated base image and some more functionality#2
Open
ifireball wants to merge 1 commit intono-name-yet:masterfrom
Open
Updated base image and some more functionality#2ifireball wants to merge 1 commit intono-name-yet:masterfrom
ifireball wants to merge 1 commit intono-name-yet:masterfrom
Conversation
1. Rebased the image on the centos:7.7.1908 image 2. Moved exported env var configuration from a file to an env var in the Dockefile 3. Added a script for storing the command-line arguments passed to the container to a file before starting up systemd 4. Made systemd and journald output go to `/dev/console` which should be collected by the container engine automatically Note that certain versions of Docker have an issue with collecting `/dev/console` properly. See the following for explanation: - systemd/systemd#4262 - moby/moby#27202 - https://bugzilla.redhat.com/show_bug.cgi?id=1373780 Signed-off-by: Barak Korren <bkorren@redhat.com>
gbenhaim
requested changes
Dec 1, 2019
|
|
||
| main() { | ||
| local export_path="${1:?}" | ||
| local include |
|
|
||
| include=$(join "${INCLUDE_LIST[@]}") | ||
| get_env_vars() { | ||
| include=$(join "$@") |
| /usr/bin/tr \\000 \\n < /proc/1/environ | | ||
| grep -E "^($include)=" >> "$export_path" | ||
| chmod 0644 "$export_path" | ||
| sed -nre "/^($include)=/{s/ /\\\\ /;p}" |
Member
There was a problem hiding this comment.
Can you please a comment which explains what this sed command does?
| ENV ENV_EXPORT_PATH=/etc/ci-container.environment | ||
| ENV ARGS_EXPORT_PATH=/etc/ci-container.args | ||
| # A list of variables to be exported to $export_path | ||
| ENV ENV_INCLUDE_LIST="ENV_EXPORT_PATH ARGS_EXPORT_PATH" |
Member
There was a problem hiding this comment.
This change implies that each image that is going to be based on the systemd image, and want to include it's own env vars, will have to redeclare the ENV_INCLUDE_LIST variable. This is risky since the ENV_EXPORT_PATH ARGS_EXPORT_PATH can be omitted when this happens.
Author
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Dockefile
container to a file before starting up systemd
/dev/consolewhich should becollected by the container engine automatically
Note that certain versions of Docker have an issue with collecting
/dev/consoleproperly. See the following for explanation:Signed-off-by: Barak Korren bkorren@redhat.com