Changed image to work

This commit is contained in:
Alexis Couvreur
2020-10-21 20:27:13 +02:00
parent 105e7b6a83
commit f051238f41
2 changed files with 13 additions and 6 deletions

View File

@@ -1,7 +1,13 @@
FROM golang:1.15.3-alpine AS build
WORKDIR /src
COPY . .
RUN go build -o ondemand-service .
FROM scratch AS bin
COPY --from=build /src/ondemand-service /
ENTRYPOINT [ "/ondemand-service" ]
ENV APP_NAME ondemand-service
ENV PORT 10000
COPY . /go/src/ondemand-service
WORKDIR /go/src/ondemand-service
RUN go build -o /go/bin/ondemand-service
FROM alpine
COPY --from=build /go/bin/ondemand-service /go/bin/ondemand-service
CMD [ "/go/bin/ondemand-service" ]