ARG golang=golang:nanoserver ARG target=microsoft/nanoserver:10.0.14393.1884 FROM $golang AS build COPY . /code WORKDIR /code RUN go build http.go FROM $target COPY --from=build /code/http.exe /http.exe EXPOSE 8080 CMD ["\\http.exe"]