Commit 6bf34f35 authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

Update Dockerfile

parent 80e2e511
Pipeline #8654 passed with stages
in 2 minutes and 7 seconds
......@@ -4,10 +4,7 @@ RUN adduser --system appuser
WORKDIR $GOPATH/src/gitlab.switch.ch/memoriav/memobase-2020/services/streaming-server
COPY . .
# Fetch dependencies
RUN go get -d -v ./...
# Compile the binary. Mind the flags because it has to work in the next image.
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o bin/app -a gitlab.switch.ch/memoriav/memobase-2020/services/streaming-server/main
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o bin/app -a gitlab.switch.ch/memoriav/memobase-2020/services/streaming-server/cmd/server
FROM scratch
WORKDIR /app
......@@ -17,7 +14,7 @@ COPY --from=builder /etc/passwd /etc/passwd
USER appuser
ADD ./static/ /app/static
ADD web/static/ /app/static
ADD web/template /app/templates
EXPOSE 81
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment