fix dockerfile
This commit is contained in:
parent
6f01844717
commit
201733e1ce
2 changed files with 2 additions and 0 deletions
|
|
@ -40,6 +40,7 @@ RUN apt-get update && apt-get install -qy --no-install-recommends $BUILD_DEPS ${
|
||||||
echo "Install toolchain" && \
|
echo "Install toolchain" && \
|
||||||
rustup target add $(cat /arch)-${TARGET_SUFFIX} && \
|
rustup target add $(cat /arch)-${TARGET_SUFFIX} && \
|
||||||
echo "Building rpxy from source" && \
|
echo "Building rpxy from source" && \
|
||||||
|
cargo update &&\
|
||||||
cargo build --release --target=$(cat /arch)-${TARGET_SUFFIX} ${CARGO_FEATURES} && \
|
cargo build --release --target=$(cat /arch)-${TARGET_SUFFIX} ${CARGO_FEATURES} && \
|
||||||
strip --strip-all /tmp/target/$(cat /arch)-${TARGET_SUFFIX}/release/rpxy &&\
|
strip --strip-all /tmp/target/$(cat /arch)-${TARGET_SUFFIX}/release/rpxy &&\
|
||||||
cp /tmp/target/$(cat /arch)-${TARGET_SUFFIX}/release/rpxy /tmp/target/release/rpxy
|
cp /tmp/target/$(cat /arch)-${TARGET_SUFFIX}/release/rpxy /tmp/target/release/rpxy
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ COPY . /tmp/
|
||||||
ENV RUSTFLAGS "-C link-arg=-s"
|
ENV RUSTFLAGS "-C link-arg=-s"
|
||||||
|
|
||||||
RUN echo "Building rpxy from source" && \
|
RUN echo "Building rpxy from source" && \
|
||||||
|
cargo update && \
|
||||||
cargo build --release --target $(cat /arch)-unknown-linux-musl ${CARGO_FEATURES} && \
|
cargo build --release --target $(cat /arch)-unknown-linux-musl ${CARGO_FEATURES} && \
|
||||||
musl-strip --strip-all /tmp/target/$(cat /arch)-unknown-linux-musl/release/rpxy && \
|
musl-strip --strip-all /tmp/target/$(cat /arch)-unknown-linux-musl/release/rpxy && \
|
||||||
cp /tmp/target/$(cat /arch)-unknown-linux-musl/release/rpxy /tmp/target/release/rpxy
|
cp /tmp/target/$(cat /arch)-unknown-linux-musl/release/rpxy /tmp/target/release/rpxy
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue