From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 4MOtIXd59ma+wgAAqHPOHw:P1 (envelope-from ) for ; Fri, 27 Sep 2024 09:23:03 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 4MOtIXd59ma+wgAAqHPOHw (envelope-from ) for ; Fri, 27 Sep 2024 11:23:03 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=a3QpkVOO; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1727428983; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=W3fxnVYMXafskWq7j0CT1qIjXXLDznFbc13J95B2q0w=; b=EQWc1TJODO4QMqwGrlOfAqwrOQpJJYp6Fp6R5uN+Ebvbx3QOvxEuU63Up5bpnOfYVnABTU R3wX0Arl0/+EnU1/XPY7XVHbbvV74SDFxRbg3salOW5oAJW7mYJRTTv3iozEQnWlp9o8xD korVg5f7WwhoZoNl0B4AmV7/1YqbLTxH6bZLW8eoJe/ufkq73HfdkB3DGuhDZ43eQ2u9Fy h/hhb9qMJViCpsE9XL2DCiL7rysjwPuDvasx77F70AoXE4A19InRlln2IYR4QpLCBGCE+l nmkTN84Mizh5FFS75coUSeY6Va/woCpSm8zSMqF1ZF44AXwjXTqL3lHdBRA6wg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1727428983; a=rsa-sha256; cv=none; b=uL2ZhWDZq6s1kQjl4+CBZEEg3fl4kZ13Drofvf3s8NCdieV2bjYS/0/TWd+15vz2jwfqnr jydJ3RM88jkh8RibcBm6dWq0qu++Z6MZCLz7PkXi3i4f+WDCluIdFTDplaCq92OGnUht0t SbCcg8p7BU/XNpABy1rcxaTDx9wTjm7eURnrGJ8txIFuVAqczhxxWGZm0PAs+wWYgdKbB3 3GvBkzuVYQcjFoie2qvZvoRclLmaQqFqYMUztUYTK4nXda90byGc0uVJbutUNoYTZxaqVx VSUP+sG88o2apDO5d1ac72ALjWinBjjXUacvpd47PouRsbgfc2JHjyKDJMlaxA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=a3QpkVOO; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6E28419B2C for ; Fri, 27 Sep 2024 11:23:03 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1su7B4-0007Uz-WC; Fri, 27 Sep 2024 05:22:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1stuD1-0006as-Gv for guix-devel@gnu.org; Thu, 26 Sep 2024 15:31:29 -0400 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1stuCz-0005Kd-LT for guix-devel@gnu.org; Thu, 26 Sep 2024 15:31:26 -0400 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-71b0d1c74bbso1028776b3a.0 for ; Thu, 26 Sep 2024 12:31:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727379082; x=1727983882; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=W3fxnVYMXafskWq7j0CT1qIjXXLDznFbc13J95B2q0w=; b=a3QpkVOOyNykJcZoBbY8GJIdzNU1d0D1IKshxvS2EQvCbRPSfa/g5hHGUXpPMjcS8F 66YcLjgz+MFh/foVQoesJJmviX8Ctl1UaugAM5a50kVC2y0eHgWij+rQhaQm+/zrvvuy 1HIBjYNezOW1u8ZX+RXdBGR1q3G0dQMgfKB75FSfZMJW9CQpc/2Kbw/7EP4l9ht9sBlU 7mXStydNNbWb0kFVljiXTAziYrg1wOuxhW+lqfF/EHEWPyntqpOViYiLZSfiDO+zlPwv +WDQJ/F0WAiYxYNs+H89cPK7eFa8ctQ77GqRA+iqA9icjSDofiPGQd0xJIz90N6tc8bB MGng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727379082; x=1727983882; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=W3fxnVYMXafskWq7j0CT1qIjXXLDznFbc13J95B2q0w=; b=K9Gzjng9TNsckISfBVs5LFojyNji5SezRDk07JbOV6wWVbl+5O9oc+qp9ltktlJaly ChDuz0QhLG1dr9ccb3xFhAQLQuQ9kFyLJ2hEe6s9Ncf6+k08sqTLMi+8Vt1G6e+ByDgC rYrrrIYZ46tTXzEvNIZZNTw6kgIkX3DLamVA/89zGv5lRmABAMHu7oHy7qJa8WOw7j9k fq1Sy52d/9ByZyoQQzFT50WV57crCnLo/ju4nDRKgcyeW5GH1DsSxuLmqVat9DU3ZDTu k1hbOTsOO0tsvxTeMNb+uq3DKewzabBOMnsBQq6eCire22iI56J/aXir9HMSfHIGlPdg 2LXQ== X-Gm-Message-State: AOJu0Yzetfdxg5awAgo+kJ6uKf7bO+XYAmBPilp5I0DyCq8kmcls+7Sc UH15/0F+rWlHpFAoaMudjf19ir0g+5gPXDKStMhl+GMAGhDpvFCMhf7x9keiJ8OCfQajPRofn2c QuAAIDLDtID/+tzlb3OHX7Ue+4LOykySp X-Google-Smtp-Source: AGHT+IFO+5bT7t5WmNuvwfUQKvxAoaGX0IFflrV7yczJdbvkOGWV8MNJU0Vh+RzfNdkHss3Ho5Dm8NmVUJluzSjo2og= X-Received: by 2002:a05:6a00:2d9b:b0:710:9d5e:555c with SMTP id d2e1a72fcca58-71b260790c9mr1136495b3a.23.1727379082491; Thu, 26 Sep 2024 12:31:22 -0700 (PDT) MIME-Version: 1.0 From: Nicolas Odermatt-Lemay Date: Thu, 26 Sep 2024 15:31:11 -0400 Message-ID: Subject: oci-container-service-type: Add support for creating networks To: guix-devel@gnu.org Content-Type: multipart/alternative; boundary="0000000000009abcef06230ac880" Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=nodermattlemay@gmail.com; helo=mail-pf1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 27 Sep 2024 05:22:17 -0400 X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -8.33 X-Migadu-Queue-Id: 6E28419B2C X-Spam-Score: -8.33 X-TUID: 2LeMbvZQP89H --0000000000009abcef06230ac880 Content-Type: text/plain; charset="UTF-8" Hi ! While trying to port a multi-container application meant to be used with docker-compose to Guix oci-container-service-type, I noticed that docker-compose creates a single network for all its containers (by default). Using oci-container-service-type, we can specify a network for each container but the network needs to exist beforehand, otherwise the service fails. So I was wondering if this is something we would want in Guix, the ability to create a network for a list of containers. Personally, I ended up adding another shepherd service to create the network before the containers were created. If it is something of interest, I'm curious to hear about ideas to implement this. Adding a field `create-network?' to `oci-container-service-type' would be a possibility but maybe it is not the right way to implement this. --0000000000009abcef06230ac880 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi !
While trying to port a multi-container= application meant to be used with docker-compose to Guix oci-container-ser= vice-type, I noticed that docker-compose creates a single network for all i= ts containers (by default). Using oci-container-service-type, we can specif= y a network for each container but the network needs to exist beforehand, o= therwise the service fails.

So I was wonderin= g if this is something we would want in Guix, the ability to create a netwo= rk for a list of containers.

Personally, I en= ded up adding another shepherd service to create the network before the con= tainers were created.

If it is something of i= nterest, I'm curious to hear about ideas to implement this. Adding a fi= eld `create-network?' to `oci-container-service-type' would be a po= ssibility but maybe it is not the right way to implement this.

--0000000000009abcef06230ac880--