Migrate deployment to Gitea Actions and Portainer
Build and Push Container / docker (push) Failing after 19m3s
Build and Push Container / docker (push) Failing after 19m3s
This commit is contained in:
+10
-14
@@ -1,22 +1,18 @@
|
||||
FROM golang:1.14-alpine as dev
|
||||
FROM golang:1.22-alpine AS builder
|
||||
|
||||
WORKDIR /go/src/Geeksbot
|
||||
COPY ./go.mod .
|
||||
COPY ./go.sum .
|
||||
WORKDIR /src
|
||||
RUN apk add --no-cache ca-certificates git tzdata
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
RUN go install github.com/dustinpianalto/geeksbot/...
|
||||
RUN go get -u github.com/go-bindata/go-bindata/...
|
||||
ARG TARGETARCH=amd64
|
||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=$TARGETARCH go build -o /out/geeksbot ./cmd/geeksbot
|
||||
|
||||
CMD [ "go", "run", "cmd/geeksbot/main.go"]
|
||||
FROM alpine:3.20
|
||||
RUN apk add --no-cache ca-certificates tzdata
|
||||
|
||||
from alpine
|
||||
COPY --from=builder /out/geeksbot /usr/local/bin/geeksbot
|
||||
|
||||
WORKDIR /bin
|
||||
|
||||
COPY --from=dev /go/bin/geeksbot ./geeksbot
|
||||
COPY --from=dev /go/bin/go-bindata ./go-bindata
|
||||
|
||||
CMD [ "geeksbot" ]
|
||||
ENTRYPOINT ["/usr/local/bin/geeksbot"]
|
||||
|
||||
Reference in New Issue
Block a user