This commit is contained in:
lixiaofei123
2021-09-16 21:55:36 +08:00
commit 12c94d8803
15 changed files with 1210 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
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"]