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
Branches
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
WORKDIR /go/src/app
......@@ -8,6 +9,7 @@ RUN glide install
RUN CGO_ENABLED=false go build -a app .
FROM alpine:3.7
WORKDIR /root/
COPY --from=builder /go/src/app/app .
CMD ["./app"]
\ No newline at end of file
WORKDIR /
COPY --from=builder /go/src/app/app /app
COPY --from=builder /go/src/app/static /static
CMD ["/app"]
\ No newline at end of file
......@@ -80,7 +80,7 @@ func returnResult(writer http.ResponseWriter, result Result) error {
writer.Write([]byte("</pre>"))
if result.Success {
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>"))
}
return nil
......@@ -94,6 +94,7 @@ func main() {
config.SourceFolder = os.Getenv("IK8R_SOURCE_FOLDER")
config.TargetFolder = os.Getenv("IK8R_TARGET_FOLDER")
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.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