|
@@ -8,38 +8,22 @@
|
|
|
FROM ubuntu:bionic AS build
|
|
|
|
|
|
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
|
|
+ --no-install-recommends \
|
|
|
ca-certificates \
|
|
|
curl \
|
|
|
- build-essential \
|
|
|
+ gcc g++ \
|
|
|
pkg-config \
|
|
|
libssl-dev
|
|
|
|
|
|
RUN curl https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init >/tmp/rustup-init && \
|
|
|
chmod +x /tmp/rustup-init && \
|
|
|
- /tmp/rustup-init -y --no-modify-path --default-toolchain stable
|
|
|
+ /tmp/rustup-init -y --no-modify-path --default-toolchain stable --profile minimal
|
|
|
ENV PATH=/root/.cargo/bin:$PATH
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
WORKDIR /tmp/source
|
|
|
-COPY Cargo.lock Cargo.toml /tmp/source/
|
|
|
-COPY parser/Cargo.toml /tmp/source/parser/Cargo.toml
|
|
|
-RUN mkdir -p /tmp/source/src /tmp/source/parser/src && \
|
|
|
- echo "fn main() {}" > /tmp/source/src/main.rs && \
|
|
|
- touch /tmp/source/parser/src/lib.rs
|
|
|
-RUN cargo fetch
|
|
|
+COPY . /tmp/source/
|
|
|
RUN cargo build --release
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-RUN rm -rf /tmp/source/src /tmp/source/parser/src
|
|
|
-COPY src /tmp/source/src
|
|
|
-COPY parser/src /tmp/source/parser/src
|
|
|
-RUN find -name "*.rs" -exec touch {} \; && cargo build --release
|
|
|
-
|
|
|
|
|
|
|
|
|
|