Dockerfile 820 B

1234567891011121314151617181920212223242526
  1. # On Alpine linux, the build fails with:
  2. # error: cannot produce proc-macro for `serde_derive v1.0.102` as the target `x86_64-unknown-linux-musl` does not support these crate types
  3. # See https://github.com/rust-lang/cargo/issues/5266
  4. # Fedora 30 produces a builder image 2.01 GiB and solang image of 294 MiB
  5. # Ubuntu 18.04 produces a builder image 1.53 GiB and solang image of 84 MiB
  6. # Debian Buster produces a builder image 2.04 GiB
  7. FROM ghcr.io/hyperledger/solang:ci as builder
  8. COPY . src
  9. WORKDIR /src/stdlib/
  10. RUN make
  11. RUN rustup default 1.63.0
  12. WORKDIR /src
  13. RUN cargo build --release
  14. FROM ubuntu:20.04
  15. COPY --from=builder /src/target/release/solang /usr/bin/solang
  16. LABEL org.opencontainers.image.title="Solang Solidity Compiler" \
  17. org.opencontainers.image.licenses="Apache-2.0"
  18. ENTRYPOINT ["/usr/bin/solang"]