forked from Mooncake-Labs/moonlink
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
24 lines (16 loc) · 764 Bytes
/
Dockerfile
File metadata and controls
24 lines (16 loc) · 764 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
# 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-x86-64-linux-gnu
ENV CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=x86_64-linux-gnu-gcc
RUN rustup target add x86_64-unknown-linux-gnu
RUN cargo build --target x86_64-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/x86_64-unknown-linux-gnu/debug/moonlink_service .