Browse Source

Dockerfile

Drn 4 years ago
parent
commit
3d08098386
2 changed files with 13 additions and 1 deletions
  1. 12 0
      Dockerfile
  2. 1 1
      discord.go

+ 12 - 0
Dockerfile

@@ -1 +1,13 @@
+FROM golang:1.15 AS builder
 
+COPY . /go/src/github.com/github.com/get-got/discord-downloader-go
+WORKDIR /go/src/github.com/github.com/get-got/discord-downloader-go
+
+RUN go mod download
+RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o app .
+
+FROM scratch
+WORKDIR /root/
+COPY --from=builder /go/src/github.com/github.com/get-got/discord-downloader-go/app .
+
+ENTRYPOINT ["./app"]

+ 1 - 1
discord.go

@@ -16,7 +16,7 @@ import (
 //#region Presence
 
 func presenceKeyReplacement(input string) string {
-	//TODO: Case-insensitive key replacement.
+	//TODO: Case-insensitive key replacement. -- If no streamlined way to do it, convert to lower to find substring location but replace normally
 	if strings.Contains(input, "{{") && strings.Contains(input, "}}") {
 		countInt := int64(dbDownloadCount()) + *config.InflateCount
 		timeNow := time.Now()