mirror of
https://github.com/stevenhowes/osgrid-server.git
synced 2026-05-27 20:13:46 +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
|
FROM paulcager/go-base:latest as build
|
||||||
|
|
||||||
WORKDIR /go
|
COPY * ./
|
||||||
|
RUN CGO_ENABLED=0 go install -v ./... && \
|
||||||
COPY go.mod *.go ./src/osgrid-server/
|
|
||||||
RUN cd /go/src/osgrid-server && \
|
|
||||||
go install -v ./... && \
|
|
||||||
sha256sum /go/bin/osgrid-server
|
sha256sum /go/bin/osgrid-server
|
||||||
|
|
||||||
FROM debian:stable-slim
|
FROM scratch
|
||||||
RUN apt-get update && apt-get -y upgrade
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=build /go/bin/osgrid-server .
|
COPY --from=build /go/bin/osgrid-server .
|
||||||
EXPOSE 9090
|
EXPOSE 9090
|
||||||
|
|||||||
Reference in New Issue
Block a user