-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdater.Dockerfile
More file actions
34 lines (27 loc) · 889 Bytes
/
updater.Dockerfile
File metadata and controls
34 lines (27 loc) · 889 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
33
34
# syntax = docker/dockerfile:1
ARG FEDORA_MAJOR
FROM fedora:${FEDORA_MAJOR}
RUN --mount=type=cache,target=/var/cache/dnf \
dnf install -y --repo fedora --repo updates \
bash \
dnf-plugins-core \
findutils \
make \
&& dnf clean all \
&& rm /etc/yum.repos.d/*.repo
# Add docker-ce RPM repository:
# - Fedora < 41: dnf config-manager --add-repo URL
# - Fedora >= 41: dnf config-manager addrepo --from-repofile=URL
RUN dnf config-manager \
--add-repo https://download.docker.com/linux/fedora/docker-ce.repo \
|| dnf config-manager addrepo \
--from-repofile=https://download.docker.com/linux/fedora/docker-ce.repo
COPY fedora.repo /etc/yum.repos.d/
RUN sed '/fastestmirror=/d' -i /etc/yum.repos.d/fedora.repo
VOLUME /var/cache/dnf
ARG FEDORA_MAJOR
ENV FEDORA_MAJOR=${FEDORA_MAJOR}
VOLUME /work
WORKDIR /work
COPY updater.sh /
CMD ["/updater.sh"]