소스 검색

Fix a bug which caused builds to fail if ADD was the first command

Solomon Hykes 12 년 전
부모
커밋
080f35fe65
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      buildfile.go

+ 2 - 0
buildfile.go

@@ -178,6 +178,8 @@ func (b *buildFile) CmdAdd(args string) error {
 	cmd := b.config.Cmd
 
 	// Create the container and start it
+	b.config.Cmd = []string{"/bin/sh", "-c", fmt.Sprintf("#(nop) ADD %s in %s", orig, dest)}
+	b.config.Image = b.image
 	container, err := b.builder.Create(b.config)
 	if err != nil {
 		return err