代码拉取完成,页面将自动刷新
# Dockerfile References: https://docs.docker.com/engine/reference/builder/
#
# Usage:
#
# docker build -t pdfcpu .
#
# Simple one off container:
# docker run pdfcpu
#
# One off container with dir binding:
# docker run -v $(pwd):/data -it --rm pdfcpu pdfcpu val test.pdf
#
# Create & run reusable container with dir binding:
# docker run --name pdfcpu -v $(pwd):/data -it pdfcpu /bin/sh
# /data # ... // run pdfcpu commands against your data
# /data # exit // exit container
#
# docker start -i pdfcpu // restart container with dir binding
# /data # ... // run pdfcpu commands against your data
# /data # exit // exit container
# Start from the latest golang base image
FROM golang:latest as builder
# install
RUN go install github.com/pdfcpu/pdfcpu/cmd/pdfcpu@latest
######## Start a new stage from scratch #######
FROM alpine:latest
RUN apk --no-cache add ca-certificates gcompat
WORKDIR /root
# Copy the pre-built binary file from the previous stage
COPY --from=builder /go/bin ./
# Export path of executable
ENV PATH="${PATH}:/root"
WORKDIR /data
# Command to run executable
CMD pdfcpu && echo && pdfcpu version -v
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。