Skip to content
Merged
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
6 changes: 4 additions & 2 deletions Sources/containertool/containertool.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ enum AllowHTTP: String, ExpressibleByArgument, CaseIterable { case source, desti
@Option(help: "Resource bundle directory")
private var resources: [String] = []

@Option(help: "Username")
@Option(help: "Default username, used if there are no matching entries in .netrc")
private var username: String?

@Option(help: "Password")
@Option(help: "Default password, used if there are no matching entries in .netrc")
private var password: String?

@Flag(name: .shortAndLong, help: "Verbose output")
Expand Down Expand Up @@ -75,6 +75,8 @@ enum AllowHTTP: String, ExpressibleByArgument, CaseIterable { case source, desti

let env = ProcessInfo.processInfo.environment
let defaultRegistry = defaultRegistry ?? env["CONTAINERTOOL_DEFAULT_REGISTRY"] ?? "docker.io"
let username = username ?? env["CONTAINERTOOL_USERNAME"]
let password = password ?? env["CONTAINERTOOL_PASSWORD"]
let from = from ?? env["CONTAINERTOOL_BASE_IMAGE"] ?? "swift:slim"
let os = os ?? env["CONTAINERTOOL_OS"] ?? "linux"

Expand Down