-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (24 loc) · 830 Bytes
/
Dockerfile
File metadata and controls
32 lines (24 loc) · 830 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
29
30
31
32
# ---- Build Stage ----
FROM rust:1.87-alpine3.22 AS builder
# Install git and build-base
RUN apk add --no-cache git build-base
# Clone repository
RUN git clone --depth 1 --branch v0.1.11 https://github.com/bobrippling/podsync/
WORKDIR /podsync
# Build binary
RUN cargo build --release --features backend-sql
# ---- Runtime Stage ----
FROM alpine:3.22
# Install sqlite3 (required to run add-user.sh)
RUN apk add --no-cache sqlite
# Copy files from builder
RUN mkdir /app
WORKDIR /app
COPY --from=builder /podsync/target/release/podsync /app/podsync
COPY --from=builder /podsync/scripts /app/scripts
# Move pod.sql to db folder to only have it in the volume
RUN mkdir /app/db
RUN touch /app/db/pod.sql
RUN ln -s /app/db/pod.sql /app/pod.sql
# Run podsync
ENTRYPOINT ["/app/podsync", "--address", "0.0.0.0", "--port", "80"]