forked from Mooncake-Labs/moonlink
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.aarch64
More file actions
28 lines (18 loc) · 935 Bytes
/
Dockerfile.aarch64
File metadata and controls
28 lines (18 loc) · 935 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
# Build command: docker build -f Dockerfile.aarch64 --platform linux/aarch64 -t moonlink-deployment:latest .
# TODO(hjiang): Use release build for docker images, update after official release.
# Build base image for compilation and linking.
FROM mcr.microsoft.com/devcontainers/rust:latest AS builder
WORKDIR /workspace
COPY . .
RUN apt-get update && apt-get install -y gcc-aarch64-linux-gnu
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
RUN rustup target add aarch64-unknown-linux-gnu
RUN cargo build --target aarch64-unknown-linux-gnu --verbose
# Use a slim image for docker image used for cloud deployment.
FROM ubuntu:24.04
RUN apt-get update && \
apt-get install -y ca-certificates libssl3 libpq5 && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=builder /workspace/target/aarch64-unknown-linux-gnu/debug/moonlink_service .
ENTRYPOINT ["/app/moonlink_service", "/tmp/moonlink"]