Docker build and deploy

This commit is contained in:
ChristianVisintin
2020-12-14 15:35:41 +01:00
parent 18aacef89f
commit 3ea8188805
3 changed files with 42 additions and 0 deletions

19
dist/build/x86_64/Dockerfile vendored Normal file
View File

@@ -0,0 +1,19 @@
FROM rust:1.48.0 AS builder
WORKDIR /usr/src/
# Add toolchains
RUN rustup target add x86_64-unknown-linux-gnu
# Install dependencies
RUN apt update && apt install -y rpm
# Clone repository
RUN git clone https://github.com/ChristianVisintin/TermSCP.git
# Set workdir to termscp
WORKDIR /usr/src/TermSCP/
# Install cargo RPM/Deb
RUN cargo install cargo-deb cargo-rpm
# Build for x86_64
RUN cargo build --release --target x86_64-unknown-linux-gnu
# Build pkgs
RUN cargo deb && cargo rpm init && cargo rpm build
CMD ["sh"]