Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ services:
build:
context: .
dockerfile: wally-registry-backend/Dockerfile
args:
- WALLY_BACKEND_BUILD_FEATURES=${WALLY_BACKEND_BUILD_FEATURES}
ports:
- "8000:8000"

Expand Down
11 changes: 9 additions & 2 deletions wally-registry-backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,20 @@ COPY wally-registry-backend/Cargo.toml /usr/app/wally-registry-backend/
COPY Cargo.toml Cargo.lock /usr/app/
COPY src/ /usr/app/src/

RUN cargo build --package wally-registry-backend --release
ARG WALLY_BACKEND_BUILD_FEATURES
RUN if [ -n "$WALLY_BACKEND_BUILD_FEATURES" ]; then \
cargoFeatures="--features $WALLY_BACKEND_BUILD_FEATURES"; \
fi && \
cargo build --package wally-registry-backend --release $cargoFeatures

# Copy actual application source in and force a modified timestamp so that
# Cargo will rebuild.
COPY ./wally-registry-backend ./wally-registry-backend/
RUN touch wally-registry-backend/src/main.rs
RUN cargo build --package wally-registry-backend --release
RUN if [ -n "$WALLY_BACKEND_BUILD_FEATURES" ]; then \
cargoFeatures="--features $WALLY_BACKEND_BUILD_FEATURES"; \
fi && \
cargo build --package wally-registry-backend --release $cargoFeatures

FROM debian:buster-slim

Expand Down