Explorar el Código

Only copy parts enough to build solang

Target can contain a lot of data and be stale.

Signed-off-by: Sean Young <sean@mess.org>
Sean Young hace 6 años
padre
commit
b5ef7622d1
Se han modificado 1 ficheros con 3 adiciones y 4 borrados
  1. 3 4
      Dockerfile

+ 3 - 4
Dockerfile

@@ -13,16 +13,15 @@ MAINTAINER Sean Young <sean@mess.org>
 RUN apt-get update
 RUN apt-get update
 RUN apt-get install -y cargo llvm-8-dev clang-8 libz-dev
 RUN apt-get install -y cargo llvm-8-dev clang-8 libz-dev
 
 
-RUN mkdir -p src/
-COPY . src/
+COPY src src/src/
+COPY stdlib src/stdlib/
+COPY build.rs Cargo.toml src/
 WORKDIR /src/stdlib/
 WORKDIR /src/stdlib/
 RUN clang-8 --target=wasm32 -c -emit-llvm -O3 -ffreestanding -fno-builtin -Wall stdlib.c
 RUN clang-8 --target=wasm32 -c -emit-llvm -O3 -ffreestanding -fno-builtin -Wall stdlib.c
 
 
 WORKDIR /src/
 WORKDIR /src/
 RUN cargo build --release
 RUN cargo build --release
 
 
-# Something more minimal than Fedora would be nice. Alphine won't work
-# since we built solang with glibc, not musl.
 FROM ubuntu:18.04
 FROM ubuntu:18.04
 COPY --from=builder /src/target/release/solang /usr/bin/solang
 COPY --from=builder /src/target/release/solang /usr/bin/solang