mirror of
https://github.com/stevenhowes/osgrid-server.git
synced 2026-05-27 00:03:38 +01:00
Build from scratch rather than debian
This commit is contained in:
+3
-7
@@ -1,14 +1,10 @@
|
||||
FROM paulcager/go-base:latest as build
|
||||
|
||||
WORKDIR /go
|
||||
|
||||
COPY go.mod *.go ./src/osgrid-server/
|
||||
RUN cd /go/src/osgrid-server && \
|
||||
go install -v ./... && \
|
||||
COPY * ./
|
||||
RUN CGO_ENABLED=0 go install -v ./... && \
|
||||
sha256sum /go/bin/osgrid-server
|
||||
|
||||
FROM debian:stable-slim
|
||||
RUN apt-get update && apt-get -y upgrade
|
||||
FROM scratch
|
||||
WORKDIR /app
|
||||
COPY --from=build /go/bin/osgrid-server .
|
||||
EXPOSE 9090
|
||||
|
||||
Reference in New Issue
Block a user