-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile.alpine-fallback
More file actions
45 lines (34 loc) · 1.24 KB
/
Containerfile.alpine-fallback
File metadata and controls
45 lines (34 loc) · 1.24 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
# SPDX-License-Identifier: PMPL-1.0-or-later
# Cloud Sync Tuner - Alpine fallback (if Wolfi lacks GNAT)
# Build with: nerdctl build -f Containerfile.alpine-fallback -t cloud-sync-tuner .
# Stage 1: Build with Alpine (has GNAT in testing)
FROM alpine:edge AS builder
# Enable testing repo for GNAT
RUN echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
RUN apk add --no-cache \
gcc-gnat@testing \
gprbuild@testing \
musl-dev \
make
WORKDIR /build
COPY src/ src/
COPY cloud_sync_tuner.gpr .
RUN mkdir -p obj bin && \
gprbuild -P cloud_sync_tuner.gpr
# Stage 2: Runtime on Wolfi (secure, minimal)
FROM cgr.dev/chainguard/wolfi-base:latest
RUN apk add --no-cache \
rclone \
fuse3 \
libgcc \
gcompat
RUN adduser -D -h /home/tuner tuner
USER tuner
WORKDIR /home/tuner
COPY --from=builder /build/bin/cloud_sync_tuner /usr/local/bin/
COPY --chown=tuner:tuner config/ /home/tuner/.config/cloud-sync-tuner/
VOLUME ["/home/tuner/output"]
ENTRYPOINT ["/usr/local/bin/cloud_sync_tuner"]
LABEL org.opencontainers.image.title="Cloud Sync Tuner" \
org.opencontainers.image.source="https://github.com/hyperpolymath/cloud-sync-tuner" \
org.opencontainers.image.licenses="PMPL-1.0-or-later"