INNER CODE UNIT · Go
TestBuildAPT
genuinetools/img · build_test.go:115
func TestBuildAPT(t *testing.T) {
name := "testbuildapt"
runBuild(t, name, withDockerfile(`
FROM debian:9-slim
RUN apt update
`))
}
func TestBuildLabels(t *testing.T) {
name := "testbuildlabels"
args := []string{"build", "-t", name, "--label", "cli-label-1=cli1", "--label", "cli-label-2=cli2", "-"}
_, err := doRun(args, withDockerfile(`
FROM scratch as builder
LABEL stage "builder"
FROM scratch
LABEL stage "final"