Skip to content

Commit

Permalink
Fix Dockerfile to handle new packages
Browse files Browse the repository at this point in the history
  • Loading branch information
loriopatrick committed Aug 25, 2024
1 parent e838a75 commit e22000a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,26 @@ RUN apk --no-cache --update add build-base perl

# Setup project structure with blank code so we can download libraries for better docker caching
COPY Cargo.toml Cargo.lock ./
RUN mkdir -p packages/agent_cli/src && mkdir -p packages/agent_core/src && mkdir -p packages/agent_proto/src
RUN mkdir -p packages/agent_cli/src && mkdir -p packages/agent_core/src && mkdir -p packages/agent_proto/src && mkdir -p packages/ping_monitor/src && mkdir -p packages/api_client/src
COPY packages/agent_cli/Cargo.toml packages/agent_cli/Cargo.toml
COPY packages/agent_core/Cargo.toml packages/agent_core/Cargo.toml
COPY packages/agent_proto/Cargo.toml packages/agent_proto/Cargo.toml
COPY packages/api_client/Cargo.toml packages/api_client/Cargo.toml
COPY packages/ping_monitor/Cargo.toml packages/ping_monitor/Cargo.toml

RUN touch packages/agent_cli/src/lib.rs && touch packages/agent_core/src/lib.rs && touch packages/agent_proto/src/lib.rs
RUN touch packages/agent_cli/src/lib.rs && touch packages/agent_core/src/lib.rs && touch packages/agent_proto/src/lib.rs && touch packages/api_client/src/lib.rs && touch packages/ping_monitor/src/lib.rs
RUN cargo fetch

# Build dep packages
COPY packages/agent_proto packages/agent_proto
RUN cargo build --release --package=playit-agent-proto

COPY packages/api_client packages/api_client
RUN cargo build --release --package=playit-api-client

COPY packages/ping_monitor packages/ping_monitor
RUN cargo build --release --package=playit-ping-monitor

COPY packages/agent_core packages/agent_core
RUN cargo build --release --package=playit-agent-core

Expand Down

0 comments on commit e22000a

Please sign in to comment.