diff --git a/Dockerfile b/Dockerfile index 9d8409d..0ad1561 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.11-alpine +FROM golang:1.12 # Set maintainer label: maintainer=[YOUR-EMAIL] LABEL maintainer="manuel.leibetseder@students.fh-hagenberg.at" @@ -8,6 +8,8 @@ WORKDIR /src # Copy local file `main.go` to the working directory COPY main.go app.go go.* model.go /src/ +RUN cd /src && go mod download +RUN cd /src && ls -la # Build the GO app as myapp binary and move it to /usr/ RUN CGO_ENABLED=0 go build -o /usr/myapp