diff --git a/Dockerfile b/Dockerfile index f94802e..7816b25 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM arm64v8/golang:1.21 AS build +FROM golang:1.21 AS build WORKDIR /app RUN mkdir cmd database types vendor COPY cmd/ ./cmd/ diff --git a/Dockerfile-arm64v8 b/Dockerfile-arm64v8 new file mode 100644 index 0000000..f94802e --- /dev/null +++ b/Dockerfile-arm64v8 @@ -0,0 +1,15 @@ +FROM arm64v8/golang:1.21 AS build +WORKDIR /app +RUN mkdir cmd database types vendor +COPY cmd/ ./cmd/ +COPY database/ ./database/ +COPY types/ ./types/ +COPY vendor/ ./vendor/ +COPY go.mod go.sum main.go ./ +RUN CGO_ENABLED=1 go build -mod vendor -installsuffix cgo -o ./fancy + +FROM debian:12-slim +WORKDIR /go +COPY --from=build /app/fancy . +ENTRYPOINT ["/go/fancy"] +CMD ["restaurant"]