-
Notifications
You must be signed in to change notification settings - Fork 176
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (22 loc) · 824 Bytes
/
Dockerfile
File metadata and controls
28 lines (22 loc) · 824 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
ARG BUILDER_BASE=ghcr.io/pgdogdev/pgdog-base-builder:latest
ARG RUNTIME_BASE=ghcr.io/pgdogdev/pgdog-base-runtime:latest
FROM ${BUILDER_BASE} AS builder
COPY . /build
COPY .git /build/.git
WORKDIR /build
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
RUN source ~/.cargo/env && \
if [ "$(uname -m)" = "aarch64" ] || [ "$(uname -m)" = "arm64" ]; then \
export RUSTFLAGS="-Ctarget-feature=+lse"; \
fi && \
cd pgdog && \
cargo build --release && \
cd .. && \
cargo build --release -p pgdog-primary-only-tables
FROM ${RUNTIME_BASE}
ENV RUST_LOG=info
COPY --from=builder /build/target/release/pgdog /usr/local/bin/pgdog
COPY --from=builder /build/target/release/libpgdog_primary_only_tables.so /usr/lib/libpgdog_primary_only_tables.so
WORKDIR /pgdog
STOPSIGNAL SIGINT
CMD ["/usr/local/bin/pgdog"]