Skip to content

Commit

Permalink
Fix Plane docker builds (#850)
Browse files Browse the repository at this point in the history
Broken by #849.
  • Loading branch information
paulgb authored Dec 6, 2024
1 parent 0a43883 commit ab084d9
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
12 changes: 7 additions & 5 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:bookworm AS builder
FROM rust:1.83-bullseye AS builder

WORKDIR /work
COPY Cargo.toml /work/
Expand All @@ -7,7 +7,7 @@ COPY dynamic-proxy/Cargo.toml /work/dynamic-proxy/Cargo.toml
COPY plane/Cargo.toml /work/plane/Cargo.toml
COPY plane/plane-tests/plane-test-macro/Cargo.toml /work/plane/plane-tests/plane-test-macro/Cargo.toml
COPY plane/plane-tests/Cargo.toml /work/plane/plane-tests/Cargo.toml
COPY plane/plane-dynamic/Cargo.toml /work/plane/plane-dynamic/Cargo.toml
COPY common/Cargo.toml /work/common/Cargo.toml

RUN mkdir /work/plane/src
RUN echo "fn main() {}" > /work/plane/src/main.rs
Expand All @@ -17,18 +17,20 @@ RUN touch /work/dynamic-proxy/src/lib.rs

RUN mkdir -p /work/plane/plane-tests/src
RUN mkdir -p /work/plane/plane-tests/plane-test-macro/src
RUN mkdir -p /work/plane/plane-dynamic/src
RUN touch /work/plane/plane-tests/plane-test-macro/src/lib.rs
RUN touch /work/plane/plane-tests/src/lib.rs
RUN touch /work/plane/plane-dynamic/src/lib.rs
RUN mkdir -p /work/common/src
RUN touch /work/common/src/lib.rs

RUN cargo build -p plane --release --locked
RUN cargo build -p plane-dynamic-proxy --release --locked
RUN cargo build -p plane-common --release --locked
RUN cargo build -p plane --release --locked

COPY .cargo .cargo
COPY .git .git
COPY plane plane
COPY dynamic-proxy dynamic-proxy
COPY common common
RUN cargo build -p plane --release --locked

FROM gcr.io/distroless/cc-debian12
Expand Down
7 changes: 7 additions & 0 deletions docker/build-quickstart.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

set -e

# Build the docker image

docker build ../ -f ./quickstart/Dockerfile -t plane-quickstart
10 changes: 6 additions & 4 deletions docker/quickstart/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# =======
# Builder
# =======
FROM rust:bookworm AS builder
FROM rust:1.83-bullseye AS builder

WORKDIR /work
COPY Cargo.toml /work/
Expand All @@ -10,7 +10,7 @@ COPY dynamic-proxy/Cargo.toml /work/dynamic-proxy/Cargo.toml
COPY plane/Cargo.toml /work/plane/Cargo.toml
COPY plane/plane-tests/plane-test-macro/Cargo.toml /work/plane/plane-tests/plane-test-macro/Cargo.toml
COPY plane/plane-tests/Cargo.toml /work/plane/plane-tests/Cargo.toml
COPY plane/plane-dynamic/Cargo.toml /work/plane/plane-dynamic/Cargo.toml
COPY common/Cargo.toml /work/common/Cargo.toml

RUN mkdir /work/plane/src
RUN echo "fn main() {}" > /work/plane/src/main.rs
Expand All @@ -20,18 +20,20 @@ RUN touch /work/dynamic-proxy/src/lib.rs

RUN mkdir -p /work/plane/plane-tests/src
RUN mkdir -p /work/plane/plane-tests/plane-test-macro/src
RUN mkdir -p /work/plane/plane-dynamic/src
RUN mkdir -p /work/common/src
RUN touch /work/plane/plane-tests/plane-test-macro/src/lib.rs
RUN touch /work/plane/plane-tests/src/lib.rs
RUN touch /work/plane/plane-dynamic/src/lib.rs
RUN touch /work/common/src/lib.rs

RUN cargo build -p plane --release --locked
RUN cargo build -p plane-dynamic-proxy --release --locked
RUN cargo build -p plane --release --locked

COPY .cargo .cargo
COPY .git .git
COPY plane plane
COPY dynamic-proxy dynamic-proxy
COPY common common
RUN cargo build -p plane --release --locked

# =======
Expand Down

0 comments on commit ab084d9

Please sign in to comment.