-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (25 loc) · 1 KB
/
Copy pathDockerfile
File metadata and controls
35 lines (25 loc) · 1 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
31
32
33
34
35
FROM rust:1-bookworm AS builder
WORKDIR /app
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
RUN git config --global url."https://github.com/".insteadOf "ssh://git@github.com/" \
&& git config --global url."https://github.com/".insteadOf "git@github.com:"
COPY . .
RUN cargo build --locked --release -p yank-server
FROM debian:bookworm-slim
ARG VERSION=dev
ARG BUILD_TIME=unknown
ARG GIT_COMMIT=unknown
LABEL org.opencontainers.image.title="yank-server"
LABEL org.opencontainers.image.description="Self-hosted yank clipboard sync server"
LABEL org.opencontainers.image.version="${VERSION}"
LABEL org.opencontainers.image.created="${BUILD_TIME}"
LABEL org.opencontainers.image.revision="${GIT_COMMIT}"
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /app/target/release/yank-server /usr/local/bin/yank-server
ENV YANK_BIND=0.0.0.0:7219
ENV YANK_DB=/data/yank-server.sqlite3
VOLUME ["/data"]
EXPOSE 7219
ENTRYPOINT ["yank-server"]