-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile
More file actions
51 lines (40 loc) · 1.27 KB
/
Containerfile
File metadata and controls
51 lines (40 loc) · 1.27 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# SPDX-License-Identifier: PMPL-1.0-or-later
# Cloud Sync Tuner - Wolfi-based container image
FROM cgr.dev/chainguard/wolfi-base:latest AS builder
# Install build dependencies
RUN apk add --no-cache \
gnat \
gprbuild \
rust \
cargo \
fuse3-dev \
pkgconf \
dbus-dev
WORKDIR /build
COPY . .
# Build Ada TUI
RUN gprbuild -P cloud_sync_tuner.gpr -XBUILD_MODE=release
# Build Rust daemons
RUN cd overlay-daemon && cargo build --release
RUN cd tray-daemon && cargo build --release
# Runtime image
FROM cgr.dev/chainguard/wolfi-base:latest
RUN apk add --no-cache \
rclone \
fuse3 \
dbus \
libnotify \
tini
COPY --from=builder /build/bin/cloud_sync_tuner /usr/bin/cloud-sync-tuner
COPY --from=builder /build/overlay-daemon/target/release/cloud-sync-overlay /usr/bin/
COPY --from=builder /build/tray-daemon/target/release/cloud-sync-tray /usr/bin/
COPY --from=builder /build/scripts/cloud-sync-status /usr/bin/
COPY --from=builder /build/config/config.toml.example /etc/cloud-sync-tuner/config.toml.example
# Create non-root user
RUN adduser -D -u 1000 sync
USER sync
WORKDIR /home/sync
# FUSE needs /dev/fuse
VOLUME ["/home/sync/.config/rclone", "/home/sync/.cache/rclone", "/mnt/cloud"]
ENTRYPOINT ["/sbin/tini", "--"]
CMD ["cloud-sync-tuner"]