-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Enabling using another container's network stack on build process #5087
Labels
Comments
gsquared94
added
kind/feature-request
priority/p2
May take a couple of releases
area/build
labels
Dec 2, 2020
I ran into this issue when trying to run the getting-started example here: https://skaffold.dev/docs/quickstart/.
If I remove the lines
from the included |
tjwebb
referenced
this issue
Dec 10, 2020
) * enabling using another container's network stack on build process Building docker images in a Jenkins-like environment running on a AWS EKS cluster secured with `kube2iam` requires the running pod to include an annotation. In our particular case, we share the docker daemon from the node with the running pod by mounting the socket as a volume. When `skaffold` builds a new image within this pod, it creates containers at node level due to the shared socket. Therefore, to have a brand new container handled by `kube2iam`, this container should reuse the pod's network stack –ergo the "pause" container's stack–. Enabling the use of `container:<name|id>` network mode from `docker run` command. It allows a build process to reuse another container's stack. > Described in [here](https://docs.docker.com/engine/reference/run/#network-settings) * Adapting REGEXP to docker requirements According to the `docker` CLI, when running a container with a wrong name, the following output is shown: ``` > docker run -it --name '$$' alpine docker: Error response from daemon: Invalid container name ($$), only [a-zA-Z0-9][a-zA-Z0-9_.-] are allowed. ``` Concatenating `container:` to the expected regular expression `[a-zA-Z0-9][a-zA-Z0-9_.-]` helps us rejecting wrong values. * runtime validation for docker network stack sharing * overriding docker local daemon in tests * validation with run context unified better testing allows to unify methods * adding skaffold error handling * removing unnecessary dependency
@zedfmario's fix has been applied. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Building docker images in a Jenkins-like environment running on a AWS EKS cluster secured with
kube2iam
requires the running pod to include an annotation. In our particular case, we share the docker daemon from the node with the running pod by mounting the socket as a volume. Whenskaffold
builds a new image within this pod, it creates containers at node level due to the shared socket. Therefore, to have a brand new container handled bykube2iam
, this container should reuse the pod's network stack –ergo the "pause" container's stack–.Expected behavior
Enabling the use of
container:<name|id>
network mode fromdocker run
command. It allows a build process to reuse another container's stack.Actual behavior
Information
Steps to reproduce the behavior
skaffold -f skaffold.yaml build
The text was updated successfully, but these errors were encountered: