Skip to content

Commit

Permalink
Fix the reference label in container images
Browse files Browse the repository at this point in the history
The reference label value needs to match the build tag and then
contain the product version.

The ARG PRODUCT_VERSION is appended when pushing the image to OBS.
  • Loading branch information
cbosdo committed Jan 11, 2024
1 parent 7508826 commit a3ef1a3
Show file tree
Hide file tree
Showing 16 changed files with 24 additions and 8 deletions.
3 changes: 2 additions & 1 deletion containers/hub-xmlrpc-api-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ LABEL org.opencontainers.image.vendor="${VENDOR}"
LABEL org.opencontainers.image.url="${URL}"
LABEL org.opencontainers.image.version="5.0.0"
LABEL org.openbuildservice.disturl="%DISTURL%"
LABEL org.opensuse.reference="${REFERENCE_PREFIX}/server:5.0.0.%RELEASE%"
LABEL org.opensuse.reference="${REFERENCE_PREFIX}/hub-xmlrpc-api:${PRODUCT_VERSION}.%RELEASE%"
# endlabelprefix
LABEL org.uyuni.version="${PRODUCT_VERSION}"

CMD ["/usr/bin/hub-xmlrpc-api"]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Use product version in reference label
2 changes: 1 addition & 1 deletion containers/init-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ LABEL org.opencontainers.image.vendor="${VENDOR}"
LABEL org.opencontainers.image.url="${URL}"
LABEL org.opencontainers.image.version=5.0.1
LABEL org.openbuildservice.disturl="%DISTURL%"
LABEL org.opensuse.reference="${REFERENCE_PREFIX}/init:5.0.1.%RELEASE%"
LABEL org.opensuse.reference="${REFERENCE_PREFIX}/init:${PRODUCT_VERSION}.%RELEASE%"
# endlabelprefix

HEALTHCHECK --interval=5s --timeout=5s --retries=5 CMD ["/usr/bin/systemctl", "is-active", "multi-user.target"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Use product version in reference label
- Fix the container version labels
3 changes: 2 additions & 1 deletion containers/proxy-httpd-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ LABEL org.opencontainers.image.url="${URL}"
LABEL org.opencontainers.image.name=proxy-httpd-image
LABEL org.opencontainers.image.version=5.0.0
LABEL org.openbuildservice.disturl="%DISTURL%"
LABEL org.opensuse.reference="${REFERENCE_PREFIX}/proxy-httpd:5.0.0.%RELEASE%"
LABEL org.opensuse.reference="${REFERENCE_PREFIX}/proxy-httpd:${PRODUCT_VERSION}.%RELEASE%"
# endlabelprefix
LABEL org.uyuni.version="${PRODUCT_VERSION}"

# http(s)
EXPOSE 80/tcp
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Use product version in reference label
3 changes: 2 additions & 1 deletion containers/proxy-salt-broker-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ LABEL org.opencontainers.image.url="${URL}"
LABEL org.opencontainers.image.name=proxy-salt-broker-image
LABEL org.opencontainers.image.version=5.0.0
LABEL org.openbuildservice.disturl="%DISTURL%"
LABEL org.opensuse.reference="${REFERENCE_PREFIX}/proxy-salt-broker:5.0.0.%RELEASE%"
LABEL org.opensuse.reference="${REFERENCE_PREFIX}/proxy-salt-broker:${PRODUCT_VERSION}.%RELEASE%"
# endlabelprefix
LABEL org.uyuni.version="${PRODUCT_VERSION}"

# Salt
EXPOSE 4505/tcp
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Use product version in reference label
3 changes: 2 additions & 1 deletion containers/proxy-squid-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ LABEL org.opencontainers.image.url="${URL}"
LABEL org.opencontainers.image.name=proxy-squid-image
LABEL org.opencontainers.image.version=5.0.0
LABEL org.openbuildservice.disturl="%DISTURL%"
LABEL org.opensuse.reference="${REFERENCE_PREFIX}/proxy-squid:5.0.0.%RELEASE%"
LABEL org.opensuse.reference="${REFERENCE_PREFIX}/proxy-squid:${PRODUCT_VERSION}.%RELEASE%"
# endlabelprefix
LABEL org.uyuni.version="${PRODUCT_VERSION}"

# Squid
EXPOSE 8080/tcp
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Use product version in reference label
3 changes: 2 additions & 1 deletion containers/proxy-ssh-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ LABEL org.opencontainers.image.url="${URL}"
LABEL org.opencontainers.image.name=proxy-ssh-image
LABEL org.opencontainers.image.version=5.0.0
LABEL org.openbuildservice.disturl="%DISTURL%"
LABEL org.opensuse.reference="${REFERENCE_PREFIX}/proxy-ssh:5.0.0.%RELEASE%"
LABEL org.opensuse.reference="${REFERENCE_PREFIX}/proxy-ssh:${PRODUCT_VERSION}.%RELEASE%"
# endlabelprefix
LABEL org.uyuni.version="${PRODUCT_VERSION}"

# SSH port
EXPOSE 22
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Use product version in reference label
3 changes: 2 additions & 1 deletion containers/proxy-tftpd-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ LABEL org.opencontainers.image.url="${URL}"
LABEL org.opencontainers.image.name=proxy-tftpd-image
LABEL org.opencontainers.image.version=5.0.0
LABEL org.openbuildservice.disturl="%DISTURL%"
LABEL org.opensuse.reference="${REFERENCE_PREFIX}/proxy-tftpd:5.0.0.%RELEASE%"
LABEL org.opensuse.reference="${REFERENCE_PREFIX}/proxy-tftpd:${PRODUCT_VERSION}.%RELEASE%"
# endlabelprefix
LABEL org.uyuni.version="${PRODUCT_VERSION}"

# tftp
EXPOSE 69/udp
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Use product version in reference label
3 changes: 2 additions & 1 deletion containers/server-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@ LABEL org.opencontainers.image.vendor="${VENDOR}"
LABEL org.opencontainers.image.url="${URL}"
LABEL org.opencontainers.image.version=5.0.0
LABEL org.openbuildservice.disturl="%DISTURL%"
LABEL org.opensuse.reference="${REFERENCE_PREFIX}/server:5.0.0.%RELEASE%"
LABEL org.opensuse.reference="${REFERENCE_PREFIX}/server:${PRODUCT_VERSION}.%RELEASE%"
# endlabelprefix
LABEL org.uyuni.version="${PRODUCT_VERSION}"

CMD ["/usr/lib/systemd/systemd"]
HEALTHCHECK --interval=5s --timeout=5s --retries=5 CMD ["/usr/bin/systemctl", "is-active", "multi-user.target"]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Use product version in reference label

0 comments on commit a3ef1a3

Please sign in to comment.