Am new to golang, and I need to generate a thumbnail from pdf when I upload it. am using ImageMagick with docker and golang.
But am getting challenged on building docker image including ImageMagick
Docker set up
FROM golang:alpine AS build
RUN apk --no-cache add gcc g++ make git
WORKDIR /go/src/app
COPY go.mod .
COPY go.sum .
RUN go mod download
COPY . .
RUN GOOS=linux go build -ldflags="-s -w" -o ./bin/web-app ./main.go
FROM alpine:3.13
RUN apk --no-cache add ca-certificates
WORKDIR /usr/bin
COPY --from=build /go/src/app/bin /go/bin
EXPOSE 1000
ENTRYPOINT /go/bin/web-app --port 1000