Problème de routage réseau dans un conteneur

 

[fusion_builder_container type="flex" hundred_percent="no" hundred_percent_height="no" min_height="" hundred_percent_height_scroll="no" align_content="stretch" flex_align_items="flex-start" flex_justify_content="flex-start" flex_column_spacing="" hundred_percent_height_center_content="yes" equal_height_columns="no" container_tag="div" menu_anchor="" hide_on_mobile="small-visibility,medium-visibility,large-visibility" status="published" publish_date="" class="" id="" spacing_medium="" margin_top_medium="" margin_bottom_medium="" spacing_small="" margin_top_small="" margin_bottom_small="" margin_top="" margin_bottom="" padding_dimensions_medium="" padding_top_medium="" padding_right_medium="" padding_bottom_medium="" padding_left_medium="" padding_dimensions_small="" padding_top_small="" padding_right_small="" padding_bottom_small="" padding_left_small="" padding_top="" padding_right="" padding_bottom="" padding_left="" link_color="" link_hover_color="" border_sizes="" border_sizes_top="" border_sizes_right="" border_sizes_bottom="" border_sizes_left="" border_color="" border_style="solid" box_shadow="no" box_shadow_vertical="" box_shadow_horizontal="" box_shadow_blur="0" box_shadow_spread="0" box_shadow_color="" box_shadow_style="" z_index="" overflow="" gradient_start_color="" gradient_end_color="" gradient_start_position="0" gradient_end_position="100" gradient_type="linear" radial_direction="center center" linear_angle="180" background_color="" background_image="" background_position="center center" background_repeat="no-repeat" fade="no" background_parallax="none" enable_mobile="no" parallax_speed="0.3" background_blend_mode="none" video_mp4="" video_webm="" video_ogv="" video_url="" video_aspect_ratio="16:9" video_loop="yes" video_mute="yes" video_preview_image="" render_logics="" absolute="off" absolute_devices="small,medium,large" sticky="off" sticky_devices="small-visibility,medium-visibility,large-visibility" sticky_background_color="" sticky_height="" sticky_offset="" sticky_transition_offset="0" scroll_offset="0" animation_type="" animation_direction="left" animation_speed="0.3" animation_offset="" filter_hue="0" filter_saturation="100" filter_brightness="100" filter_contrast="100" filter_invert="0" filter_sepia="0" filter_opacity="100" filter_blur="0" filter_hue_hover="0" filter_saturation_hover="100" filter_brightness_hover="100" filter_contrast_hover="100" filter_invert_hover="0" filter_sepia_hover="0" filter_opacity_hover="100" filter_blur_hover="0"][fusion_builder_row][fusion_builder_column type="1_1" layout="1_1" align_self="auto" content_layout="column" align_content="flex-start" valign_content="flex-start" content_wrap="wrap" spacing="" center_content="no" link="" target="_self" min_height="" hide_on_mobile="small-visibility,medium-visibility,large-visibility" sticky_display="normal,sticky" class="" id="" type_medium="" type_small="" order_medium="0" order_small="0" dimension_spacing_medium="" dimension_spacing_small="" dimension_spacing="" dimension_margin_medium="" dimension_margin_small="" margin_top="" margin_bottom="" padding_medium="" padding_small="" padding_top="" padding_right="" padding_bottom="" padding_left="" hover_type="none" border_sizes="" border_color="" border_style="solid" border_radius="" box_shadow="no" dimension_box_shadow="" box_shadow_blur="0" box_shadow_spread="0" box_shadow_color="" box_shadow_style="" background_type="single" gradient_start_color="" gradient_end_color="" gradient_start_position="0" gradient_end_position="100" gradient_type="linear" radial_direction="center center" linear_angle="180" background_color="" background_image="" background_image_id="" background_position="left top" background_repeat="no-repeat" background_blend_mode="none" render_logics="" filter_type="regular" filter_hue="0" filter_saturation="100" filter_brightness="100" filter_contrast="100" filter_invert="0" filter_sepia="0" filter_opacity="100" filter_blur="0" filter_hue_hover="0" filter_saturation_hover="100" filter_brightness_hover="100" filter_contrast_hover="100" filter_invert_hover="0" filter_sepia_hover="0" filter_opacity_hover="100" filter_blur_hover="0" animation_type="" animation_direction="left" animation_speed="0.3" animation_offset="" last="true" border_position="all" first="true"][fusion_text columns="" column_min_width="" column_spacing="" rule_style="default" rule_size="" rule_color="" content_alignment_medium="" content_alignment_small="" content_alignment="" hide_on_mobile="small-visibility,medium-visibility,large-visibility" sticky_display="normal,sticky" class="" id="" margin_top="" margin_right="" margin_bottom="" margin_left="" font_size="" fusion_font_family_text_font="" fusion_font_variant_text_font="" line_height="" letter_spacing="" text_color="" animation_type="" animation_direction="left" animation_speed="0.3" animation_offset=""]

Ce petit article est un compte rendu d'intervention sur un conteneur qui veut pas m'obéir ... le méchant ...

Le contexte : je déploie un Nextcloud avec docker-compose, ce Nextcloud est derrière un Traefik (voir article ), j'en déploie plusieurs régulièrement sans problèmes et là pour celui-ci de façon aléatoire il me prends pas le bon réseau comme réseau par défaut, et donc pas de routage correct et donc l'application ne peut pas fonctionner correctement !!!

Je suis donc obligé de manipuler le namespace netns pour changer la route par défaut de mon conteneur, voici comment je fais.

[/fusion_text][fusion_syntax_highlighter theme="" language="x-sh" line_numbers="" line_wrapping="" copy_to_clipboard="" copy_to_clipboard_text="" hide_on_mobile="small-visibility,medium-visibility,large-visibility" class="" id="" font_size="" border_size="" border_color="" border_style="" background_color="" line_number_background_color="" line_number_text_color="" margin_top="" margin_right="" margin_bottom="" margin_left=""]IyBSw6ljdXDDqXJhdGlvbiBkdSBwaWQgZHUgY29udGVuZXVyIApwaWQ9JChzdWRvIGRvY2tlciBpbnNwZWN0IC1mICd7ey5TdGF0ZS5QaWR9fScgY29udGFpbmVyKQoKIyBDcsOpYXRpb24gZHUgcsOpcGVydG9pcmUgcG91ciB0cmF2YWlsbGVyIApzdWRvIG1rZGlyIC1wIC92YXIvcnVuL25ldG5zCgojIEZhaXJlIHVuIGxpZW5zIGVudHJlIGxlIG5hbWVzcGFjZSBkdSBwcm9jZXNzIGV0IGxlIHLDqXBlcnRvaXJlIGRlIHRyYXZhaWwKc3VkbyBsbiAtcyAvcHJvYy8kcGlkL25zL25ldCAvdmFyL3J1bi9uZXRucy8kcGlkCgojIE1hbmlwdWxlcgpzdWRvIGlwIG5ldG5zIGV4ZWMgJHBpZCBpcCByb3V0ZQpzdWRvIGlwIG5ldG5zIGV4ZWMgJHBpZCBpcCByb3V0ZSBkZWwgZGVmYXVsdCAKc3VkbyBpcCBuZXRucyBleGVjICRwaWQgaXAgcm91dGUgYWRkIGRlZmF1bHQgdmlhIDE5Mi4xNjguMTMwLjMKCiMgTmV0dG95ZXIKc3VkbyBybSAtcmYgL3Zhci9ydW4vbmV0bnMvJHBpZA==[/fusion_syntax_highlighter][fusion_text columns="" column_min_width="" column_spacing="" rule_style="default" rule_size="" rule_color="" content_alignment_medium="" content_alignment_small="" content_alignment="" hide_on_mobile="small-visibility,medium-visibility,large-visibility" sticky_display="normal,sticky" class="" id="" margin_top="" margin_right="" margin_bottom="" margin_left="" font_size="" fusion_font_family_text_font="" fusion_font_variant_text_font="" line_height="" letter_spacing="" text_color="" animation_type="" animation_direction="left" animation_speed="0.3" animation_offset=""]

Dans tout cela ce qui est assez bizarre c'est que c'est aléatoire ... des fois ça marche des fois ça marche pas ... les plus vieux comprendront le pourquoi de l'image de cet article 😉

[/fusion_text][/fusion_builder_column][/fusion_builder_row][/fusion_builder_container]