Add Dockerfile.

change-name
Robert Jacob 5 years ago
parent cefb4a6bb0
commit 46e51c820d
  1. 17
      Dockerfile

@ -0,0 +1,17 @@
FROM golang:1 AS builder
ENV CGO_ENABLED=0
WORKDIR /go/src/git.hacknology.de/projekte/spaceapi.git
COPY . .
RUN go test ./...
RUN go install -v -tags netgo -ldflags "-w" ./cmd/spaceapi-server
FROM busybox
COPY --from=builder /go/bin/spaceapi-server /bin/spaceapi-server
RUN mkdir /data
EXPOSE 8080
WORKDIR /data
ENTRYPOINT [ "/bin/spaceapi-server" ]
Loading…
Cancel
Save