Skip to content
This repository was archived by the owner on Oct 6, 2024. It is now read-only.

Commit fe14ba2

Browse files
Nyah CheckNyah
authored andcommitted
Update docker file
1 parent 1dd26b9 commit fe14ba2

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Dockerfile
2+
**.md
3+
.git

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@ ENV GO111MODULE=on
1010
WORKDIR /app
1111
RUN echo "Build container"
1212
COPY . .
13-
RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o ./youtube-dl download.go main.go
13+
RUN CGO_ENABLED=0 GOOS=linux go build -o /youtube-dl .
1414

1515

1616
# Runtime container
1717
FROM scratch
18-
RUN echo "Runtime container"
19-
COPY --from=go-base /app/youtube-dl /youtube-dl
18+
COPY --from=go-base /youtube-dl /youtube-dl
2019
ENTRYPOINT ["/youtube-dl"]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Flags:
4848
### Example
4949

5050
```console
51-
$ ./youtube-dl -format mp3 https://www.youtube.com/watch?v=jOWsu8ePrbE
51+
$ ./youtube-dl -format mp3 -id https://www.youtube.com/watch?v=lWEbEtr_Vng
5252
```
5353

5454
## Roadmap

download_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import (
77
var tables = []struct {
88
url, id string // input
99
}{
10-
{"https://www.youtube.com/watch?v=HpNluHOAJFA", "HpNluHOAJFA"},
11-
{"https://www.youtube.com/watch?v=jOWsu8ePrbE", "jOWsu8ePrbE"},
10+
{"https://www.youtube.com/watch?v=lWEbEtr_Vng", "lWEbEtr_Vng"},
11+
{"https://www.youtube.com/watch?v=ALWmcO8S-dc", "ALWmcO8S-dc"},
1212
{"", ""},
1313
{"https://www.facebook.com/mark/videos?v=RDHpNluHOAJFA", ""},
14-
{"https://www.youtube.com/watch?v=lWEbEtr_Vng", "lWEbEtr_Vng"},
14+
{"https://www.youtube.com/watch?v=ALWmcO8S-dc", "ALWmcO8S-dc"},
1515
{"https://www.wsj.com/articles/trump-administration-wont-withdraw-from-paris-climate-deal-1505593922", ""},
1616
{"https://vimeo.com/101522071", ""},
1717
}

main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ func parseUrls(urls string) []string {
8888
}
8989

9090
func beginDownload(urls []string) {
91-
9291
if len(urls) < 2 {
9392
if err := decodeVideoStream(urls[0], path, format); err != nil {
9493
logrus.Errorf("Unable to beginDownload: %v", err)

0 commit comments

Comments
 (0)