go versie

This commit is contained in:
2020-03-25 11:20:14 +01:00
parent ce771881ab
commit 2e7f52ea47
10 changed files with 55 additions and 28 deletions

View File

@@ -1,10 +1,9 @@
from python:3.7-alpine
copy . /app
workdir /app
run pip install -r requirements.txt
expose 80
entrypoint [ "python" ]
cmd [ "app.py" ]
FROM golang:alpine as builder
RUN mkdir /build
COPY main.go /build/main.go
WORKDIR /build
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-extldflags "-static"' -o main .
FROM scratch
COPY --from=builder /build/main /main
EXPOSE 80
CMD ["./main"]