make the dockerfiles not to fail during build

This commit is contained in:
blek 2023-10-22 23:46:17 +10:00
parent d16615a07c
commit 022dffa1c4
Signed by: blek
GPG Key ID: 14546221E3595D0C
2 changed files with 5 additions and 4 deletions

View File

@ -4,7 +4,8 @@ FROM rust:alpine as builder
WORKDIR /opt/build
COPY . .
RUN apk add --no-cache musl-dev upx
RUN apk add --no-cache musl-dev upx nodejs yarn && \
yarn global add uglify-js
RUN cargo b -r
RUN strip target/release/filed && upx --best target/release/filed

View File

@ -7,10 +7,10 @@ COPY . .
RUN apk add --no-cache musl-dev upx
RUN cargo b -r
RUN strip target/release/filed && upx --best target/release/filed
RUN strip target/release/janitor && upx --best target/release/janitor
# --- deploy ---
FROM busybox:musl
COPY --from=builder /opt/build/target/release/filed /bin/filed
CMD [ "/bin/filed" ]
COPY --from=builder /opt/build/target/release/janitor /bin/janitor
CMD [ "/bin/janitor" ]