ci: add required packages in dockerfile for libvips
All checks were successful
/ build-and-push-image (push) Successful in 1m33s
All checks were successful
/ build-and-push-image (push) Successful in 1m33s
This commit is contained in:
parent
e244fcb334
commit
4730bfb1c4
11
Dockerfile
11
Dockerfile
|
@ -2,17 +2,26 @@ FROM golang:1.22.3-alpine AS builder
|
||||||
|
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
|
RUN apk update
|
||||||
|
|
||||||
|
RUN apk add build-base vips vips-dev
|
||||||
|
|
||||||
# pre-copy/cache go.mod for pre-downloading dependencies and only redownloading them in subsequent builds if they change
|
# pre-copy/cache go.mod for pre-downloading dependencies and only redownloading them in subsequent builds if they change
|
||||||
COPY go.mod go.sum ./
|
COPY go.mod go.sum ./
|
||||||
RUN go mod download && go mod verify
|
RUN go mod download && go mod verify
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN go build -v -o konulukonum
|
RUN CGO_ENABLED=1 go build -v -o konulukonum
|
||||||
|
|
||||||
RUN go test -v ./...
|
RUN go test -v ./...
|
||||||
|
|
||||||
FROM alpine
|
FROM alpine
|
||||||
WORKDIR /root/app
|
WORKDIR /root/app
|
||||||
|
|
||||||
|
RUN apk update
|
||||||
|
|
||||||
|
RUN apk add vips
|
||||||
|
|
||||||
COPY --from=builder /usr/src/app .
|
COPY --from=builder /usr/src/app .
|
||||||
|
|
||||||
CMD ["./konulukonum"]
|
CMD ["./konulukonum"]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user