Dockerfile 585 B

123456789101112131415161718192021222324
  1. FROM --platform=${TARGETPLATFORM} golang:1.20
  2. ARG TARGETPLATFORM
  3. ARG BUILDPLATFORM
  4. RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"
  5. LABEL org.opencontainers.image.source https://github.com/cloudflare/cfssl
  6. LABEL org.opencontainers.image.description "Cloudflare's PKI toolkit"
  7. ARG TARGETOS
  8. ARG TARGETARCH
  9. WORKDIR /workdir
  10. COPY . /workdir
  11. RUN git clone https://github.com/cloudflare/cfssl_trust.git /etc/cfssl && \
  12. make clean && \
  13. GOOS=${TARGETOS} GOARCH=${TARGETARCH} make all && cp bin/* /usr/bin/
  14. EXPOSE 8888
  15. ENTRYPOINT ["cfssl"]
  16. CMD ["--help"]