2
2
3
3
# HACK: Open Build Service currently only supports short names. Assume short name by default, allow to override to qualified name via ARG
4
4
ARG BASE_IMAGE_PREFIX=
5
- FROM ${BASE_IMAGE_PREFIX}suse/sle15:15.3
5
+ FROM ${BASE_IMAGE_PREFIX}suse/sle15:15.3 AS fat
6
6
7
7
# Distro repos
8
8
RUN zypper addrepo http://download.opensuse.org/distribution/leap/15.3/repo/oss/ main
@@ -11,6 +11,23 @@ RUN zypper addrepo http://download.opensuse.org/update/leap/15.3/sle/ updates
11
11
# Product repos
12
12
RUN zypper addrepo https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Master/images/repo/Uyuni-Proxy-POOL-x86_64-Media1/ product
13
13
14
+ # Main packages
15
+ RUN zypper --gpg-auto-import-keys --non-interactive install --auto-agree-with-licenses spacewalk-proxy-salt
16
+
17
+ # Additional material
18
+ COPY uyuni-configure.py /usr/bin/uyuni-configure.py
19
+ RUN chmod +x /usr/bin/uyuni-configure.py
20
+
21
+ # Prepare for slimming down
22
+ COPY prepare_target.sh .
23
+ RUN sh prepare_target.sh
24
+
25
+ # Define slim image
26
+ FROM ${BASE_IMAGE_PREFIX}suse/sle15:15.3 AS slim
27
+
28
+ RUN zypper --gpg-auto-import-keys --non-interactive install --auto-agree-with-licenses python3 python3-PyYAML python3-pyzmq
29
+ COPY --from=fat /target /
30
+
14
31
# Build Service required labels
15
32
# labelprefix=org.opensuse.uyuni.proxy-salt-broker
16
33
LABEL org.opencontainers.image.title="Proxy salt-broker container"
@@ -26,9 +43,4 @@ EXPOSE 4506/tcp
26
43
27
44
VOLUME "/etc/uyuni"
28
45
29
- RUN zypper --gpg-auto-import-keys --non-interactive install --auto-agree-with-licenses spacewalk-proxy-salt
30
-
31
- COPY uyuni-configure.py /usr/bin/uyuni-configure.py
32
- RUN chmod +x /usr/bin/uyuni-configure.py
33
-
34
46
CMD uyuni-configure.py && salt-broker
0 commit comments