-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsourcegit.Containerfile
More file actions
47 lines (37 loc) · 1.43 KB
/
sourcegit.Containerfile
File metadata and controls
47 lines (37 loc) · 1.43 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
# syntax=docker/dockerfile:1
ARG UID=1000
ARG VERSION=EDGE
ARG RELEASE=0
ARG BASE_IMAGE=quay.io/jim60105/toolbx:latest
########################################
# Base stage
########################################
FROM ${BASE_IMAGE} AS base
########################################
# Final stage
########################################
FROM base AS final
ARG UID
# Make sure the cache is refreshed
ARG RELEASE
# RUN mount cache for multi-arch: https://github.com/docker/buildx/issues/549#issuecomment-1788297892
ARG TARGETARCH
ARG TARGETVARIANT
RUN --mount=type=cache,id=dnf-$TARGETARCH$TARGETVARIANT,sharing=locked,target=/var/cache/dnf \
dnf -y install libglvnd-glx
ENV LD_LIBRARY_PATH="/usr/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"
# Install sourcegit
RUN --mount=type=cache,id=dnf-$TARGETARCH$TARGETVARIANT,sharing=locked,target=/var/cache/dnf \
curl https://codeberg.org/api/packages/yataro/rpm.repo | sed -e 's/gpgcheck=1/gpgcheck=0/' > sourcegit.repo && \
dnf config-manager addrepo --from-repofile=./sourcegit.repo && \
dnf -y install --repo=gitea-yataro sourcegit
# Copy desktop file
COPY --chown=$UID:0 --chmod=775 sourcegit/icons /usr/share/icons
COPY --chown=$UID:0 --chmod=775 sourcegit/desktop /usr/share/applications
# Copy toolbox runner
COPY --chown=$UID:0 --chmod=775 sourcegit/runner /copy-to-host
ARG VERSION
ARG RELEASE
LABEL version=${VERSION} \
release=${RELEASE} \
io.k8s.display-name="toolbx-sourcegit"