@ -1,4 +1,4 @@
FROM golang
FROM golang AS build
COPY . /code
WORKDIR /code
@ -7,7 +7,7 @@ RUN CGO_ENABLED=0 go build -a -installsuffix cgo http.go
FROM scratch
COPY --from=0 /code/http /http
COPY --from=build /code/http /http
EXPOSE 8080
@ -7,7 +7,7 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -a -installsuffix cgo http.go
@ -7,7 +7,7 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -a -installsuffix cgo http.go
FROM golang:nanoserver
FROM golang:nanoserver AS build
@ -7,7 +7,7 @@ RUN go build http.go
FROM microsoft/nanoserver
COPY --from=0 /code/http.exe /http.exe
COPY --from=build /code/http.exe /http.exe