-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Adapting validation for docker container network mode to include ENV_VARS #5589
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
Adapting validation for docker container network mode to include ENV_VARS #5589
Conversation
…ARS. It also finds docker containers by ids using HasPrefix instead of equal. from now on, it is possible to write the container name as follows: ``` build: docker: network: "container:{{.ENV_VAR}}" ``` it will automatically translate the ENV_VAR with the os.Environment variable.
Codecov Report
@@ Coverage Diff @@
## master #5589 +/- ##
==========================================
- Coverage 71.08% 71.06% -0.03%
==========================================
Files 402 402
Lines 15145 15182 +37
==========================================
+ Hits 10766 10789 +23
- Misses 3586 3598 +12
- Partials 793 795 +2
Continue to review full report at Codecov.
|
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.
few nits.
…-network-mode-with-envvars
Description
In PR #5088 I enabled the possibility of reusing the network stack from another docker container.
That mode required either a name or a docker id to check what container you want to reuse the network stack from.
The configuration at that point required the exact name or id. It's quite common in the docker environment, when referencing by id, to use the very first 12 chars of the container name, as those are the ones shown when
docker ps
is executed.Example:
This PR finds docker containers by ids using HasPrefix instead of equal. It also adapts the validation for docker container network mode to include ENV_VARS. It will automatically translate the ENV_VAR with the
os.Environment
variable.User facing changes (remove if N/A)
from now on, it is possible to write the container name as follows:
where
ENV_VAR
could be7765077b5d37
, for example.