Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion packages/infra/client/manager/src/actor/oci_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,13 @@ fn mounts(opts: &ConfigOpts) -> Result<serde_json::Value> {
"type": "bind",
"source": opts.actor_path.join("resolv.conf").to_str().context("resolv.conf path")?,
"options": ["rbind", "rprivate"]
}
},
{
"destination": "/etc/hosts",
"type": "bind",
"source": opts.actor_path.join("hosts").to_str().context("hosts path")?,
"options": ["rbind", "rprivate"]
},
]))
}

Expand Down
14 changes: 13 additions & 1 deletion packages/infra/client/manager/src/actor/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ impl Actor {

// resolv.conf
//
// See also rivet-job.conflist in lib/bolt/core/src/dep/terraform/install_scripts/files/nomad.sh
// See also rivet-actor.conflist in packages/services/cluster/src/workflows/server/install/install_scripts/files/pegboard_configure.sh
fs::write(
actor_path.join("resolv.conf"),
indoc!(
Expand All @@ -314,6 +314,18 @@ impl Actor {
)
.await?;

// hosts
fs::write(
actor_path.join("hosts"),
indoc!(
"
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
"
),
)
.await?;

Ok(())
}

Expand Down
1 change: 0 additions & 1 deletion packages/infra/client/manager/src/runner.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::{
io::Write,
os::unix::process::CommandExt,
path::{Path, PathBuf},
process::Stdio,
Expand Down