mirror of
https://github.com/lixiaofei123/pdftoolbox.git
synced 2026-08-12 23:21:39 +08:00
19 lines
479 B
Docker
19 lines
479 B
Docker
FROM golang AS build
|
|
WORKDIR /build
|
|
COPY . .
|
|
ENV GOPROXY https://goproxy.io,direct
|
|
ENV CGO_ENABLED=0
|
|
RUN go build -o pdftoolbox
|
|
|
|
FROM ubuntu
|
|
RUN apt-get -y update && rm -rf /var/lib/apt/lists/*
|
|
RUN cp gs /usr/bin/gs
|
|
RUN mkdir -p /opt/pdftoolbox
|
|
RUN mkdir -p /opt/pdftoolbox/input
|
|
RUN mkdir -p /opt/pdftoolbox/output
|
|
COPY --from=build /build/pdftoolbox /opt/pdftoolbox/pdftoolbox
|
|
COPY static /opt/pdftoolbox/static
|
|
EXPOSE 8082
|
|
WORKDIR /opt/pdftoolbox/
|
|
ENTRYPOINT ["./pdftoolbox"]
|