notify_push/Dockerfile

30 строки
712 B
Docker
Исходник Обычный вид История

# SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: AGPL-3.0-or-later
FROM clux/muslrust:stable AS build
2021-01-20 03:48:20 +03:00
COPY Cargo.toml Cargo.lock ./
# Build with a dummy main to pre-build dependencies
RUN mkdir src && \
sed -i '/test_client/d' Cargo.toml && \
2021-01-20 03:48:20 +03:00
echo "fn main(){}" > src/main.rs && \
cargo build --release && \
rm -r src
2021-02-09 02:39:26 +03:00
COPY build.rs ./
2021-02-09 15:38:04 +03:00
COPY appinfo/info.xml ./appinfo/
2021-02-26 18:13:14 +03:00
COPY src/ ./src/
RUN touch src/main.rs
2021-01-20 03:48:20 +03:00
RUN cargo build --release
# Pick the executable file for the right architecture and system
RUN mv /volume/target/*-unknown-*-musl/release/notify_push /notify_push
2021-01-20 03:48:20 +03:00
FROM scratch
COPY --from=build /notify_push /
2021-02-24 00:12:34 +03:00
EXPOSE 7867
2021-01-20 03:48:20 +03:00
CMD ["/notify_push"]