mirror of
https://github.com/apple/container.git
synced 2026-09-19 22:25:44 +00:00
LinuxContainer: Add /etc/hosts writing functionality (#207)
Closes #206 Much like we have support for supplying DNS configurations and writing out /etc/resolv.conf, this adds a way to write out /etc/hosts for a given container.
This commit is contained in:
@@ -60,10 +60,15 @@ public protocol VirtualMachineAgent: Sendable {
|
||||
func addressAdd(name: String, address: String) async throws
|
||||
func routeAddDefault(name: String, gateway: String) async throws
|
||||
func configureDNS(config: DNS, location: String) async throws
|
||||
func configureHosts(config: Hosts, location: String) async throws
|
||||
}
|
||||
|
||||
extension VirtualMachineAgent {
|
||||
public func closeProcessStdin(id: String, containerID: String?) async throws {
|
||||
throw ContainerizationError(.unsupported, message: "closeProcessStdin")
|
||||
}
|
||||
|
||||
public func configureHosts(config: Hosts, location: String) async throws {
|
||||
throw ContainerizationError(.unsupported, message: "configureHosts")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user