Hi everyone, I’m testing the new Multi-container Machines Multi-container Machines · Fly Docs feature using machine_config in fly.json to run an app container alongside a cloudflare/mesh:latest sidecar.
I’m encountering two main issues regarding sidecar execution and image deployment workflow:
──────
1. Sidecar (cloudflare/mesh:latest) process execution & SSH inspection
- Behavior: The logs only show
[info] cloudflare-mesh container started, but no application logs are outputted by the sidecar process. - SSH Inspection: When SSHing into the machine specifying the container (
fly ssh console --app=cf-proxy --container=cloudflare-mesh --pty -C "busybox sh"), I cannot locate the container’s filesystem or its default /entrypoint binary. - What is the expected way to inspect an individual container’s rootfs when SSHing into a multi-container machine?
──────
2. fly deploy image resolution & container replacement workflow
- If I specify
"image": "registry.fly.io/cf-proxy:latest"incontainers.json, deployment fails because the :latest tag is not found
in the registry. - Currently, the only workaround is:
- Trigger a build/deploy to generate an image tag.
- Copy the resulting image tag (e.g.
registry.fly.io/cf-proxy:deployment-01M0V1AYKRAMBF8S4PAXA2FVRZ). - Paste it directly into containers.json.
- Run fly deploy again.
What is the correct way of using the latest build of the referenced Dockerfile ?
──────
Configuration Files
fly.json
{
"$schema": "https://www.schemastore.org/fly.json",
"app": "cf-proxy",
"build": { "dockerfile": "Dockerfile" },
"deploy": { "strategy": "rolling" },
"experimental": {},
"machine_config": "crates/cf-proxy/containers.json",
"primary_region": "iad"
}
crates/cf-proxy/containers.json
{
"$schema": "../../../../lib/shared/schema/machine-config.schema.json",
"containers": [
{
"env": { "SRCNAT_ENABLED": "true" },
"image": "cloudflare/mesh:latest",
"cmd": [],
"name": "cloudflare-mesh",
"restart": { "policy": "no" },
"secrets": [{ "env_var": "MESH_NODE_TOKEN", "name": "MESH_NODE_TOKEN" }]
},
{
"depends_on": [{ "name": "cloudflare-mesh" }],
"env": { "PORT": "8080" },
"image": "registry.fly.io/cf-proxy:deployment-01M0V1AYKRAMBF8S4PAXA2FVRZ",
"name": "cf-proxy",
"restart": { "policy": "no" },
"secrets": [{ "env_var": "MESH_NODE_TOKEN", "name": "MESH_NODE_TOKEN" }]
}
],
"guest": {
"cpu_kind": "shared",
"kernel_args": [
"net.ipv4.ip_forward=1",
"net.ipv6.conf.all.forwarding=1",
"net.ipv6.conf.default.forwarding=1"
],
"cpus": 1,
"memory_mb": 512,
"persist_rootfs": "always"
}
}
(I can provide the Dockerfile as well if needed).
Any insights into the expected config for Pilot multi-container lifecycle and fly deploy container mapping would be greatly appreciated!
, but have some rough edges still, and builds are definitely one of those rough edges.