Skip to content

Commit

Permalink
add a dockerfile for replicator
Browse files Browse the repository at this point in the history
  • Loading branch information
imor committed Jul 19, 2024
1 parent f03556e commit 2c10d20
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,7 @@ CDC stream is not the only kind of data a data pipeline performs. There's also f
## Performance

Currently the data source and sinks copy table row and CDC events one at a time. This is expected to be slow. Batching, and other strategies will likely improve the performance drastically. But at this early stage the focus is on correctness rather than performance. There are also zero benchmarks at this stage, so commentary about performance is closer to speculation than reality.

## Docker

To create the docker image for replicator run `docker build -f ./replicator/Dockerfile .` from the root of the repo.
12 changes: 12 additions & 0 deletions replicator/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM rust:1.79.0-slim-bookworm as builder
WORKDIR /app
# TODO: remove protobuf-compiler once the upstream gcp-bigquery-client remove it from its deps
RUN apt update && apt install protobuf-compiler clang -y
COPY . .
RUN cargo build --release -p replicator

FROM rust:1.79.0-slim-bookworm as runtime
WORKDIR /app
COPY --from=builder /app/target/release/replicator replicator
COPY replicator/configuration configuration
ENTRYPOINT ["./replicator"]

0 comments on commit 2c10d20

Please sign in to comment.