-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (29 loc) · 1.31 KB
/
Copy pathDockerfile
File metadata and controls
30 lines (29 loc) · 1.31 KB
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
29
30
# syntax=docker/dockerfile:1
# Slim release image for the beyond-queue server, published to
# ghcr.io/beyondoss/beyond-queue for local-dev / docker-compose use.
# Built and run on ubuntu:24.04 (noble) to match the production rootfs.
FROM ubuntu:24.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive \
RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential curl ca-certificates clang libclang-dev pkg-config \
libssl-dev protobuf-compiler \
&& rm -rf /var/lib/apt/lists/*
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
| sh -s -- -y --default-toolchain 1.92.0 --profile minimal
WORKDIR /src
COPY . .
RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/src/target,sharing=locked \
cargo build --release --bin beyond-queue \
&& cp /src/target/release/beyond-queue /usr/local/bin/beyond-queue \
&& strip /usr/local/bin/beyond-queue
FROM ubuntu:24.04
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates curl openssl \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr/local/bin/beyond-queue /usr/local/bin/beyond-queue
EXPOSE 4566
ENTRYPOINT ["/usr/local/bin/beyond-queue", "serve"]