Changeset View
Changeset View
Standalone View
Standalone View
services/backup/Dockerfile
Show All 10 Lines | |||||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y | RUN curl https://sh.rustup.rs -sSf | sh -s -- -y | ||||
RUN mkdir -p /home/comm/app/backup | RUN mkdir -p /home/comm/app/backup | ||||
WORKDIR /home/comm/app/backup | WORKDIR /home/comm/app/backup | ||||
RUN cargo init --bin | RUN cargo init --bin | ||||
# Cache build dependencies in a new layer | # Cache build dependencies in a new layer | ||||
COPY services/backup/Cargo.toml services/backup/Cargo.lock ./ | COPY services/backup/Cargo.toml services/backup/Cargo.lock ./ | ||||
COPY services/comm-services-lib ../comm-services-lib | |||||
RUN cargo build --release && rm src/*.rs | RUN cargo build --release && rm src/*.rs | ||||
# Copy actual application sources | # Copy actual application sources | ||||
COPY services/backup . | COPY services/backup . | ||||
COPY shared/protos/backup.proto ../../shared/protos/ | COPY shared/protos/backup.proto ../../shared/protos/ | ||||
COPY shared/protos/blob.proto ../../shared/protos/ | COPY shared/protos/blob.proto ../../shared/protos/ | ||||
# Remove the previously-built binary so that only the application itself is | # Remove the previously-built binary so that only the application itself is | ||||
Show All 26 Lines |