Skip to content
Snippets Groups Projects
Commit a9ad25f5 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Fixes issues in dockerfile

parent 651a55f6
No related branches found
No related tags found
No related merge requests found
FROM golang as builder FROM golang:alpine as builder
RUN apk add --no-cache curl git gcc musl-dev
RUN curl https://glide.sh/get | sh RUN curl https://glide.sh/get | sh
WORKDIR /go/src/app WORKDIR /go/src/app
...@@ -8,6 +9,7 @@ RUN glide install ...@@ -8,6 +9,7 @@ RUN glide install
RUN CGO_ENABLED=false go build -a app . RUN CGO_ENABLED=false go build -a app .
FROM alpine:3.7 FROM alpine:3.7
WORKDIR /root/ WORKDIR /
COPY --from=builder /go/src/app/app . COPY --from=builder /go/src/app/app /app
CMD ["./app"] COPY --from=builder /go/src/app/static /static
\ No newline at end of file CMD ["/app"]
\ No newline at end of file
...@@ -80,7 +80,7 @@ func returnResult(writer http.ResponseWriter, result Result) error { ...@@ -80,7 +80,7 @@ func returnResult(writer http.ResponseWriter, result Result) error {
writer.Write([]byte("</pre>")) writer.Write([]byte("</pre>"))
if result.Success { if result.Success {
writer.Write([]byte("<p><a href=\"")) writer.Write([]byte("<p><a href=\""))
writer.Write([]byte(fmt.Sprintf("http://localhost:8080/i/%s", result.Id))) writer.Write([]byte(fmt.Sprintf("https://i.k8r.eu/i/%s", result.Id)))
writer.Write([]byte("\">Uploaded Image</a></p>")) writer.Write([]byte("\">Uploaded Image</a></p>"))
} }
return nil return nil
...@@ -94,6 +94,7 @@ func main() { ...@@ -94,6 +94,7 @@ func main() {
config.SourceFolder = os.Getenv("IK8R_SOURCE_FOLDER") config.SourceFolder = os.Getenv("IK8R_SOURCE_FOLDER")
config.TargetFolder = os.Getenv("IK8R_TARGET_FOLDER") config.TargetFolder = os.Getenv("IK8R_TARGET_FOLDER")
config.Redis.Address = os.Getenv("IK8R_REDIS_ADDRESS") config.Redis.Address = os.Getenv("IK8R_REDIS_ADDRESS")
config.Redis.Password = os.Getenv("IK8R_REDIS_PASSWORD")
config.ImageQueue = os.Getenv("IK8R_REDIS_IMAGE_QUEUE") config.ImageQueue = os.Getenv("IK8R_REDIS_IMAGE_QUEUE")
config.ResultChannel = os.Getenv("IK8R_REDIS_RESULT_CHANNEL") config.ResultChannel = os.Getenv("IK8R_REDIS_RESULT_CHANNEL")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment