parent
6e8bb6cb17
commit
b0eed25d4a
@ -1,9 +1,11 @@
|
|||||||
FROM golang AS build
|
FROM golang AS build
|
||||||
|
|
||||||
|
ARG arch=amd64
|
||||||
|
|
||||||
COPY . /code
|
COPY . /code
|
||||||
WORKDIR /code
|
WORKDIR /code
|
||||||
|
|
||||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -a -installsuffix cgo http.go
|
RUN CGO_ENABLED=0 GOOS=linux GOARCH=$arch go build -a -installsuffix cgo http.go
|
||||||
|
|
||||||
FROM scratch
|
FROM scratch
|
||||||
|
|
@ -1,14 +0,0 @@
|
|||||||
FROM golang AS build
|
|
||||||
|
|
||||||
COPY . /code
|
|
||||||
WORKDIR /code
|
|
||||||
|
|
||||||
RUN CGO_ENABLED=0 go build -a -installsuffix cgo http.go
|
|
||||||
|
|
||||||
FROM scratch
|
|
||||||
|
|
||||||
COPY --from=build /code/http /http
|
|
||||||
|
|
||||||
EXPOSE 8080
|
|
||||||
|
|
||||||
CMD ["/http"]
|
|
@ -1,14 +0,0 @@
|
|||||||
FROM golang AS build
|
|
||||||
|
|
||||||
COPY . /code
|
|
||||||
WORKDIR /code
|
|
||||||
|
|
||||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -a -installsuffix cgo http.go
|
|
||||||
|
|
||||||
FROM scratch
|
|
||||||
|
|
||||||
COPY --from=build /code/http /http
|
|
||||||
|
|
||||||
EXPOSE 8080
|
|
||||||
|
|
||||||
CMD ["/http"]
|
|
Loading…
Reference in new issue