Skip to content

Commit

Permalink
Dockerfileにlibvips-devを入れる
Browse files Browse the repository at this point in the history
Signed-off-by: drumato <[email protected]>
  • Loading branch information
Drumato committed Apr 10, 2024
1 parent 92ddeed commit 6b4bc6e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@ ARG OYAKI_VERSION
WORKDIR /go/src/oyaki
COPY . /go/src/oyaki

RUN CGO_ENABLED=0 go build -ldflags "-s -w -X main.version=${OYAKI_VERSION}" -o /go/bin/oyaki
RUN apt update && apt install -y curl \
RUN apt update && apt install -y curl libvips-dev \
&& curl https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.3.1-linux-x86-64.tar.gz --output libwebp.tar.gz \
&& tar vzxf libwebp.tar.gz \
&& mv libwebp-1.3.1-linux-x86-64/bin/cwebp /go/bin/
RUN go build -ldflags "-s -w -X main.version=${OYAKI_VERSION}" -o /go/bin/oyaki

FROM gcr.io/distroless/static-debian11
FROM debian:bookworm

COPY --from=build /go/bin/oyaki /
COPY --from=build /go/bin/cwebp /bin/

RUN apt update && apt install -y libvips-dev

EXPOSE 8080

CMD ["/oyaki"]

0 comments on commit 6b4bc6e

Please sign in to comment.