-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
45 lines (28 loc) · 990 Bytes
/
Dockerfile
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
# Build rview.
FROM golang:1.23-alpine AS builder
WORKDIR /rview
# Add git to embed commit hash and build time.
RUN apk add --update --no-cache make git
COPY . .
RUN make build && go clean -cache && ./bin/rview --version
# Download rclone.
FROM rclone/rclone:1.69 AS rclone-src
RUN rclone --version
# Build the final image.
FROM alpine:3.21
LABEL org.opencontainers.image.title="Rview"
LABEL org.opencontainers.image.description="Web-based UI for Rclone"
LABEL org.opencontainers.image.source="https://github.com/ShoshinNikita/rview"
LABEL org.opencontainers.image.licenses="MIT"
EXPOSE 8080
WORKDIR /srv
# For rclone - https://rclone.org/docs/#config-config-file
ENV XDG_CONFIG_HOME=/config
# Add rclone first for better caching.
COPY --from=rclone-src /usr/local/bin/rclone /usr/local/bin/rclone
# Install vips.
RUN apk add --update --no-cache vips-tools libheif ca-certificates && \
vips --version
# Add rview.
COPY --from=builder /rview/bin .
ENTRYPOINT [ "./rview" ]