CLI tool to import your articles to Plume (experimental)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

40 lines
1.1 KiB

  1. # Build: https://github.com/Plume-org/amsterdam
  2. # Run: docker run --rm -it -v $PWD:/conversion amsterdam:latest md /conversion/*.md
  3. # $PWD is the current directory, assumed to contain the markdown files for conversion. Change if using a different directory.
  4. FROM rust:1-stretch as builder
  5. # Prep
  6. RUN apt-get update && apt-get install -y --no-install-recommends \
  7. ca-certificates \
  8. gettext \
  9. git \
  10. curl \
  11. gcc \
  12. make \
  13. openssl \
  14. libssl-dev
  15. # Install rust tools and dependencies ahead of build to improve layer caching
  16. # No deps only in cargo so cheat a little
  17. WORKDIR /scratch/amsterdam-deps
  18. COPY Cargo.toml Cargo.lock rust-toolchain ./
  19. RUN mkdir src && touch src/lib.rs && cargo build
  20. # Build amsterdam
  21. WORKDIR /scratch/amsterdam
  22. COPY . .
  23. RUN cargo install --path .
  24. # Prep final container with amsterdam as the entrypoint
  25. FROM debian:stretch-slim
  26. RUN apt-get update && apt-get install -y --no-install-recommends \
  27. ca-certificates \
  28. libssl1.1
  29. COPY --from=builder /usr/local/cargo/bin/amsterdam /bin/
  30. WORKDIR /conversion
  31. CMD ["help"]
  32. ENTRYPOINT ["/bin/bash", "-l", "-c", "amsterdam"]