File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -8,17 +8,15 @@ RUN mkdir bin && \
88 apt update -y && apt upgrade -y && apt install -y musl-tools && \
99 rustup target add x86_64-unknown-linux-musl
1010
11- # Mounting src using bind mount is slower for some reason
12- COPY src src
13-
1411# NOTE: Due to caching this is actually faster than using
1512# Two separate cargo builds (one without source present).
1613RUN --mount=type=cache,target=target \
1714 --mount=type=cache,target=/usr/local/cargo/git \
1815 --mount=type=cache,target=/usr/local/cargo/registry \
16+ --mount=type=bind,source=src,target=src \
17+ --mount=type=bind,source=openapi.json,target=openapi.json \
1918 --mount=type=bind,source=Cargo.toml,target=Cargo.toml,readwrite \
2019 --mount=type=bind,source=Cargo.lock,target=Cargo.lock,readwrite \
21- --mount=type=bind,source=openapi.json,target=openapi.json,readwrite \
2220 # Use musl target as the binary is about 1MiB smaller
2321 cargo build --profile $PROFILE --target x86_64-unknown-linux-musl && \
2422 # The "dev" target directory is named "debug" instead
You can’t perform that action at this time.
0 commit comments